top of page

Forum Comments

Maximum Number of Time Periods
In Configuration Support
Djordje Herceg
Jul 02, 2019
Hi; I am trying to add another config parameter to the configSettings_t struct, right after the "uint8_t disableBatteryLevelDisplay" field in main.c. However, what worries me is that the AudioMoth Configuration App (Electron) v1.2.2. sends exactly four time periods and there is room for five time periods in the configSettings_t struct. Therefore I am afraid that the fields in the configSettings_t struct and the configuration data received over the USB will be misaligned in the AudioMoth RAM. I have read the posts above and I am aware that four time periods can sometimes become five, however, I looked at the "app.js" file and could not find the JavaScript code that does that in the configureDevice() function. Is the fifth time period added somewhere else? As I see things, the following fields will be misaligned by four bytes when sent from the Configuration App to the firmware 1.2.1 (app.js): packet[index++] = ui.isLocalTime() ? ui.calculateTimezoneOffsetHours() : 0; packet[index++] = batteryCheckbox.checked ? 1 : 0; packet[index++] = batteryLevelCheckbox.checked ? 0 : 1; /* For non-integer timezones */ packet[index++] = ui.isLocalTime() ? (ui.calculateTimezoneOffsetMins() % 60) : 0; Would you please let me know if the above really is an issue, or am I mistaken? Maybe the firmware realigns the data correctly after the usb package is received? If so, where? Also, please suggest how I should add another configuration parameter (field) into the configSettings_t struct? Thank you!
0
0

Djordje Herceg

More actions
bottom of page