Skip to content

Commit

Permalink
Add log file
Browse files Browse the repository at this point in the history
Refs: #37
  • Loading branch information
orontee committed Oct 4, 2023
1 parent 0b48737 commit 55163b9
Show file tree
Hide file tree
Showing 26 changed files with 1,300 additions and 417 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/builddir
/crossfile_arm.ini
/3rd-parties
/data*.json
18 changes: 16 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,20 @@ convert /media/matthias/Vivlio/screens/scr0002.bmp \
docs/screenshot-hourly-forecast.jpg
```

## Remote debugging
## Debugging

### Log file

The application can be started with the `--verbose` command line
argument to generate a detailed log file. The file path is of the form
`/mnt/ext1/system/state/taranis.log` but may vary depending on the use
of profiles.

One can specify command line arguments when starting the application
from [pbterm](https://github.com/Alastor27/pbterm) or through [Desktop
integration](./docs/desktop_integration.md)

### Remote debugging

One must first start `gdbserver` on the e-reader:

Expand All @@ -114,7 +127,8 @@ One must first start `gdbserver` on the e-reader:
5. Run `gdbserver --attach :10002 ${TARANIS_PID}`

The e-reader must be connected to Internet and its IP address must be
known (eg start `ipconfig` in `pbterm`).
known (eg start `ipconfig` in `pbterm`). It is recommended to disable
automatic poweroff.

On the host computer, start a shell with current working directory the
root directory of a Git clone of taranis repository. Then start GDB:
Expand Down
269 changes: 269 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Added

- Add log file
[#37](https://github.com/orontee/taranis/issues/37)

- Document desktop integration
[#36](https://github.com/orontee/taranis/issues/36)

Expand Down Expand Up @@ -309,3 +312,269 @@ Fix some (minor) visual glitches
[#3](https://github.com/orontee/taranis/issues/3)

- Weather icons [#1](https://github.com/orontee/taranis/issues/1)
Don't open menu during data refresh
[#51](https://github.com/orontee/taranis/issues/51)

- Fix some (minor) visual glitches
[#47](https://github.com/orontee/taranis/issues/47)

- Display full date in status bar
[#46](https://github.com/orontee/taranis/issues/46)

- Fix background color of icons
[#45](https://github.com/orontee/taranis/issues/45)

### Removed

## [1.1.0] - 2023-09-16

### Added

- Display daily forecast
[#8](https://github.com/orontee/taranis/issues/8)

- Display credits in about dialog
[#34](https://github.com/orontee/taranis/issues/34)

- History of locations in menu
[#18](https://github.com/orontee/taranis/issues/18)

- Display alerts [#24](https://github.com/orontee/taranis/issues/24)

- Polish translations
[#22](https://github.com/orontee/taranis/issues/22)

### Changed

- Switching forecast view should not refresh data nor update whole
screen [#38](https://github.com/orontee/taranis/issues/38)

- Don't refresh data after cancel of location edit
[#39](https://github.com/orontee/taranis/issues/39)

- Fix invisible alerts button handing touch events
[#35](https://github.com/orontee/taranis/issues/35)

## [1.0.1] - 2023-09-07

### Added

- Check software version at startup
[#30](https://github.com/orontee/taranis/issues/30)

## [1.0.0] - 2023-09-06

### Added

- Draw precipitation histogram
[#20](https://github.com/orontee/taranis/issues/20)

- Sub-menu to select unit system
[#4](https://github.com/orontee/taranis/issues/4)

- Location selection through text input
[#12](https://github.com/orontee/taranis/issues/12)

- Specify language when calling OpenWeather API
[#15](https://github.com/orontee/taranis/issues/15)

- Take profile into account when reading configuration
[#13](https://github.com/orontee/taranis/issues/13)

- Display current weather description
[#14](https://github.com/orontee/taranis/issues/14)

- Elide location text when too long
[#12](https://github.com/orontee/taranis/issues/12)

- About dialog [#7](https://github.com/orontee/taranis/issues/7)

- Application menu [#6](https://github.com/orontee/taranis/issues/6)

- Support for translations
[#3](https://github.com/orontee/taranis/issues/3)

- Weather icons [#1](https://github.com/orontee/taranis/issues/1)
Automatic refresh should not popup connection dialog
[#50](https://github.com/orontee/taranis/issues/50)

- API key can be specified through configuration file
[#44](https://github.com/orontee/taranis/issues/44)

- Automatic refresh every hour
[#26](https://github.com/orontee/taranis/issues/26)

- Show month day and name under day name
[#48](https://github.com/orontee/taranis/issues/48)

- Evenly distribute space between columns of daily forecast view
[#49](https://github.com/orontee/taranis/issues/49)

- Touch control allow to switch pages
[#27](https://github.com/orontee/taranis/issues/27)

- Min and max temperatures are displayed in daily forecast
[#43](https://github.com/orontee/taranis/issues/43)

### Changed

- Fix some (minor) visual glitches
[#47](https://github.com/orontee/taranis/issues/47)

- Display full date in status bar
[#46](https://github.com/orontee/taranis/issues/46)

- Fix background color of icons
[#45](https://github.com/orontee/taranis/issues/45)

### Removed

## [1.1.0] - 2023-09-16

### Added

- Display daily forecast
[#8](https://github.com/orontee/taranis/issues/8)

- Display credits in about dialog
[#34](https://github.com/orontee/taranis/issues/34)

- History of locations in menu
[#18](https://github.com/orontee/taranis/issues/18)

- Display alerts [#24](https://github.com/orontee/taranis/issues/24)

- Polish translations
[#22](https://github.com/orontee/taranis/issues/22)

### Changed

- Switching forecast view should not refresh data nor update whole
screen [#38](https://github.com/orontee/taranis/issues/38)

- Don't refresh data after cancel of location edit
[#39](https://github.com/orontee/taranis/issues/39)

- Fix invisible alerts button handing touch events
[#35](https://github.com/orontee/taranis/issues/35)

## [1.0.1] - 2023-09-07

### Added

- Check software version at startup
[#30](https://github.com/orontee/taranis/issues/30)

## [1.0.0] - 2023-09-06

### Added

- Draw precipitation histogram
[#20](https://github.com/orontee/taranis/issues/20)

- Sub-menu to select unit system
[#4](https://github.com/orontee/taranis/issues/4)

- Location selection through text input
[#12](https://github.com/orontee/taranis/issues/12)

- Specify language when calling OpenWeather API
[#15](https://github.com/orontee/taranis/issues/15)

- Take profile into account when reading configuration
[#13](https://github.com/orontee/taranis/issues/13)

- Display current weather description
[#14](https://github.com/orontee/taranis/issues/14)

- Elide location text when too long
[#12](https://github.com/orontee/taranis/issues/12)

- About dialog [#7](https://github.com/orontee/taranis/issues/7)

- Application menu [#6](https://github.com/orontee/taranis/issues/6)

- Support for translations
[#3](https://github.com/orontee/taranis/issues/3)

- Weather icons [#1](https://github.com/orontee/taranis/issues/1)
Fix some (minor) visual glitches
[#47](https://github.com/orontee/taranis/issues/47)

- Display full date in status bar
[#46](https://github.com/orontee/taranis/issues/46)

- Fix background color of icons
[#45](https://github.com/orontee/taranis/issues/45)

### Removed

## [1.1.0] - 2023-09-16

### Added

- Display daily forecast
[#8](https://github.com/orontee/taranis/issues/8)

- Display credits in about dialog
[#34](https://github.com/orontee/taranis/issues/34)

- History of locations in menu
[#18](https://github.com/orontee/taranis/issues/18)

- Display alerts [#24](https://github.com/orontee/taranis/issues/24)

- Polish translations
[#22](https://github.com/orontee/taranis/issues/22)

### Changed

- Switching forecast view should not refresh data nor update whole
screen [#38](https://github.com/orontee/taranis/issues/38)

- Don't refresh data after cancel of location edit
[#39](https://github.com/orontee/taranis/issues/39)

- Fix invisible alerts button handing touch events
[#35](https://github.com/orontee/taranis/issues/35)

## [1.0.1] - 2023-09-07

### Added

- Check software version at startup
[#30](https://github.com/orontee/taranis/issues/30)

## [1.0.0] - 2023-09-06

### Added

- Draw precipitation histogram
[#20](https://github.com/orontee/taranis/issues/20)

- Sub-menu to select unit system
[#4](https://github.com/orontee/taranis/issues/4)

- Location selection through text input
[#12](https://github.com/orontee/taranis/issues/12)

- Specify language when calling OpenWeather API
[#15](https://github.com/orontee/taranis/issues/15)

- Take profile into account when reading configuration
[#13](https://github.com/orontee/taranis/issues/13)

- Display current weather description
[#14](https://github.com/orontee/taranis/issues/14)

- Elide location text when too long
[#12](https://github.com/orontee/taranis/issues/12)

- About dialog [#7](https://github.com/orontee/taranis/issues/7)

- Application menu [#6](https://github.com/orontee/taranis/issues/6)

- Support for translations
[#3](https://github.com/orontee/taranis/issues/3)

- Weather icons [#1](https://github.com/orontee/taranis/issues/1)
4 changes: 4 additions & 0 deletions docs/desktop_integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ To customize the application icon and group:
},
{
```

⚠️ Note that the comments describing the format and possible attributes
contains a typo: One must use the `params` (plural!) attribute to pass
parameters to an application.
13 changes: 7 additions & 6 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ project(
]
)

configure_file(
input: 'crossfile_arm.ini.in',
output: 'crossfile_arm-v2.ini',
configuration: {'pwd': meson.global_build_root()}
)

pbres_command = find_program(
'./SDK_6.3.0/SDK-B288/usr/bin/pbres',
required: true
Expand Down Expand Up @@ -41,11 +35,18 @@ compiler = meson.get_compiler('cpp')

taranis_deps = [
compiler.find_library('inkview', required: true),
compiler.find_library('boost_system', required: true, static: true),
compiler.find_library('boost_filesystem', required: true, static: true),
compiler.find_library('boost_date_time', required: true, static: true),
compiler.find_library('boost_log', required: true, static: true),
compiler.find_library('boost_log_setup', required: true, static: true),
compiler.find_library('boost_thread', required: true, static: true),
compiler.find_library('curl', required: true),
compiler.find_library('jsoncpp', required: true),
compiler.find_library('gsl', required: true, static: true),
compiler.find_library('gslcblas', required: true, static: true),
compiler.find_library('m', required: true, static: true),
compiler.find_library('pthread', required: true),
]

subdir('src')
Expand Down
6 changes: 5 additions & 1 deletion src/app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,19 @@
#include "events.h"
#include "inkview.h"

void taranis::handle_about_dialog_button_clicked(int button_index) {
void taranis::App::handle_about_dialog_button_clicked(int button_index) {
CloseDialog();
}

void taranis::App::refresh_data_maybe() {
BOOST_LOG_TRIVIAL(debug) << "Refreshing data maybe";

iv_netinfo *netinfo = NetInfo();
if (netinfo == nullptr or not netinfo->connected) {
SetHardTimer(App::refresh_timer_name, &taranis::App::refresh_data_maybe,
App::refresh_period);

BOOST_LOG_TRIVIAL(debug) << "Restarting refresh timer since not connected";
return;
}
const auto event_handler = GetEventHandler();
Expand Down
Loading

0 comments on commit 55163b9

Please sign in to comment.