firmware merge requestshttps://git.flow3r.garden/card10/firmware/-/merge_requests2019-08-22T15:35:02Zhttps://git.flow3r.garden/card10/firmware/-/merge_requests/192fix(pmic): properly release the two locks2019-08-22T15:35:02Zschneiderfix(pmic): properly release the two locksv1.4rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/188Fix BME680 Bugs2019-08-22T14:17:42Zrahixcard10@rahix.deFix BME680 Bugs@chris007, there were some things I overlooked when reviewing your MR. Fixed them myself, please take a look at the commits to see what was missing. Sorry!@chris007, there were some things I overlooked when reviewing your MR. Fixed them myself, please take a look at the commits to see what was missing. Sorry!v1.4https://git.flow3r.garden/card10/firmware/-/merge_requests/184fix(utime.c): make set_time correctly subtract TZONE_OFFSET2019-08-22T12:58:57ZFerdinand Bachmannfix(utime.c): make set_time correctly subtract TZONE_OFFSETthere were two bugs in `set_time`:
- `TZONE_OFFSET` is not multiplied by 1000, even though `epic_rtc_set_milliseconds` was used.
- `TZONE_OFFSET` is _added_ in both `time` and `set_time`. `set_time` should subtract the timezone offse...there were two bugs in `set_time`:
- `TZONE_OFFSET` is not multiplied by 1000, even though `epic_rtc_set_milliseconds` was used.
- `TZONE_OFFSET` is _added_ in both `time` and `set_time`. `set_time` should subtract the timezone offset.
Testcase:
```py
import utime
old = utime.time()
utime.set_time(old)
new = utime.time()
if old != new:
print("time difference:", new - old)
# will print 7607, or 2.11 hours with the old code
# should print 0 or 1 at most
```v1.4https://git.flow3r.garden/card10/firmware/-/merge_requests/180Add BME680 demo app2019-08-22T14:10:48Zchris007Add BME680 demo appDemo App which shows Temperature, Humidity and Pressure.
Updates every 10 secs.Demo App which shows Temperature, Humidity and Pressure.
Updates every 10 secs.v1.4https://git.flow3r.garden/card10/firmware/-/merge_requests/179feat(fatfs): remember by which core an FD was opened, allow to close all FDs ...2019-08-22T15:33:42Zswymfeat(fatfs): remember by which core an FD was opened, allow to close all FDs by a certain coreuntested as of right now, but we can and do now close all FDs opened by core1 in hardware_reset(). In a fatfs_detach, we close *all* just like before.
Whether an FD is owned by core1 is determined via the API_CALL_MAM->call_flag member,...untested as of right now, but we can and do now close all FDs opened by core1 in hardware_reset(). In a fatfs_detach, we close *all* just like before.
Whether an FD is owned by core1 is determined via the API_CALL_MAM->call_flag member, since an API call is the only way for obtain an FD at all.v1.4swymswymhttps://git.flow3r.garden/card10/firmware/-/merge_requests/172Watchdog timer implemented2019-08-22T16:04:44ZJeff GoughWatchdog timer implementedEnable watchdog timer on boot. Add FreeRTOS task to clear the timer.
Watchdog expires after 10.7 seconds, and is cleared every 8 seconds.Enable watchdog timer on boot. Add FreeRTOS task to clear the timer.
Watchdog expires after 10.7 seconds, and is cleared every 8 seconds.v1.4rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/163Support for BHI1602019-08-22T17:47:53ZkoaloSupport for BHI160v1.4rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/254Debug queue handling for logging messages coming serial2019-08-24T19:20:55ZDanukeru (Paul)Debug queue handling for logging messages coming serialv1.7https://git.flow3r.garden/card10/firmware/-/merge_requests/248Hauke/ble extra logging2019-08-24T19:33:49ZHauke MehrtensHauke/ble extra loggingv1.7rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/241Relax lock requirements to prevent busy lock2019-08-24T10:16:35Zrahixcard10@rahix.deRelax lock requirements to prevent busy lockThis prevents the initial battery readout failing because of the BHI.This prevents the initial battery readout failing because of the BHI.v1.7swymswymhttps://git.flow3r.garden/card10/firmware/-/merge_requests/240Perform serial prints in a critical section2019-08-24T10:30:10Zrahixcard10@rahix.dePerform serial prints in a critical sectionSometimes during initialization, one `log_msg()` intercepts another one,
leading to a whole lot of weird issues in other modules (like I2C). I
suspect this to be memory corruption of some kind. The issues can be
fixed by performing ser...Sometimes during initialization, one `log_msg()` intercepts another one,
leading to a whole lot of weird issues in other modules (like I2C). I
suspect this to be memory corruption of some kind. The issues can be
fixed by performing serial prints in a critical section, thus ensuring
atomicity of prints. Note that this does not mean log messages will not
interleave.
A possible downside of this approach is that prints can take quite some
time. We did not notice any issues with that so far though. Apart from
that, not many prints happen anyway.v1.7swymswymhttps://git.flow3r.garden/card10/firmware/-/merge_requests/237Report app_folder on metadata read exception2019-08-24T10:24:12ZDaniel EhlersReport app_folder on metadata read exceptionWhen reading metadata of an app result in an exception reporting the name helps debugging the right app....When reading metadata of an app result in an exception reporting the name helps debugging the right app....v1.7rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/221improve error logging2019-08-24T07:00:11Zswymimprove error logging- hw-lock: log return address when lock is busy
- pmic: print strerror(errno)
- hw-lock: log return address when lock is busy
- pmic: print strerror(errno)
v1.7rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/200Fix watchdog bootloop2019-08-24T06:54:43ZJeff GoughFix watchdog bootloop2.7 seconds was too aggressive for the latest build. Changed to 5.4 seconds, clearing every 5 seconds.
Clear watchdog on clearing software timer init so that clearing timer and watchdog timer start in sync.2.7 seconds was too aggressive for the latest build. Changed to 5.4 seconds, clearing every 5 seconds.
Clear watchdog on clearing software timer init so that clearing timer and watchdog timer start in sync.v1.7rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/261Add led activity to ECG app2019-08-27T08:29:51ZYuval AdamAdd led activity to ECG appv1.8https://git.flow3r.garden/card10/firmware/-/merge_requests/257feat(ecg-app): add pause-mode2019-08-25T10:24:56ZDaniel Hoffendfeat(ecg-app): add pause-modewith longer 1s press on the TOP_RIGHT buttont you can pause the screen
update. You can then scroll through the increases 4s buffer with
BUTTON_LEFT and BOTTOM_RIGHT. Another press on TOP_RIGHT brings you back
into the normal mode.
The l...with longer 1s press on the TOP_RIGHT buttont you can pause the screen
update. You can then scroll through the increases 4s buffer with
BUTTON_LEFT and BOTTOM_RIGHT. Another press on TOP_RIGHT brings you back
into the normal mode.
The logging operation doesn't get interrupted when pausing the screen.v1.8rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/238check if the field bin is existing in the metadata, and use it as exec2019-08-25T10:22:26ZKloenkcheck if the field bin is existing in the metadata, and use it as execallow the choose executable name in metadata.jsonallow the choose executable name in metadata.jsonv1.8rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/236issue 118 ambient light sensor max framerate2019-08-25T09:28:15Zfleurissue 118 ambient light sensor max frameratesince freertos ticks at 1kHz i can't really use it for super fast input, so i just put in a direct access. precise timing kinda is the user's problem. each read has an overhead of ~240us, you might wanna add a 100-300us delay with utime...since freertos ticks at 1kHz i can't really use it for super fast input, so i just put in a direct access. precise timing kinda is the user's problem. each read has an overhead of ~240us, you might wanna add a 100-300us delay with utime.sleep_us for stability though.v1.8rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/272Fix up ECG app2019-08-28T11:39:23ZxiretzaFix up ECG appMake everything a bit more pythonic and readable, as well as flipping the graph upside down so higher values are drawn above instead of below.Make everything a bit more pythonic and readable, as well as flipping the graph upside down so higher values are drawn above instead of below.v1.9https://git.flow3r.garden/card10/firmware/-/merge_requests/271fix(gfx): rectangle_fill is one pixel to small2019-08-28T17:03:39ZJannis Riegerfix(gfx): rectangle_fill is one pixel to smallgfx_rectangle_fill draws rectangles one pixel too small. gfx_rectangle works correctly by including the end coordinate in the drawn rectangle. Drawing a filled rectangle on the other hand stops before reaching the end coordinate.gfx_rectangle_fill draws rectangles one pixel too small. gfx_rectangle works correctly by including the end coordinate in the drawn rectangle. Drawing a filled rectangle on the other hand stops before reaching the end coordinate.v1.9