- Oct 05, 2019
-
-
rahix authored
In unrecoverable situations we should provide a common way to output the cause of the error and then reset the CPU. The panic() function is mean to be exactly that. It outputs the error-cause, stack-trace, and firmware revision, accompanied by a link to the issue-tracker to encourage people to report the error. After a timeout of ~1.5s it resets the CPU and reboots. Future Work: - Right now, the stack-trace only has a depth of one which is the return address from where panic() was called. In the future it might make sense to provide a deeper stack-trace if a robust implementation is possible. - Integration of @msgctl's faultscreen (!79) so users who don't have the serial console open at all times can also see what happened. Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
In severe error conditions, asynchronous prints will never work. For such cases we need a way to make prints happen synchronously again, the same way it works during early boot. Add a serial_return_to_synchronous() function which unconditionally switches the serial driver code to synchronous mode. Only use this function in unrecoverable error conditions! Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
card10_reset() won't ever return to where it was called from. Telling the compiler this can help with program-flow analysis. Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
See merge request card10/firmware!332
-
Fix two bugs in the display/gfx module: 1. The animation of the simple_menu used in the main menu had the issue that there is a black line visible at the top. This is due the gfx_puts method ignoring lines, where the top pixel of the string is above the top of the screen. As gfx_puts uses gfx_setpixel which in turn ignores pixels outside of the screen, remove the check in gfx_puts. 2. X and Y coordinates were cast to unsigned-ints before being given to the gfx-library which means calls like circ(0, -10, 30) would be draw at coordinates like [0,65526]. Fix this by changing the data-type of all coordinates to signed-integers. Also remove the x and y ranges from the documentation of the individual python functions and instead add a general documentation about the screen and it's size/coordinate system.
-
- Oct 04, 2019
-
-
schneider authored
fix(build): Fix module changes not getting picked up See merge request card10/firmware!328
-
dx authored
See merge request card10/firmware!294
-
We update the documentaiton and CI tooling to remove references to the jailbreak firmware. We also slightly update the docs to mention USB mode in a separate page, for unification purposes.
-
rahix authored
See merge request card10/firmware!329
-
dx authored
And show the no_apps_message instead of crashing
-
rahix authored
Previously, we left out the dependency of the QSTR header on `modules.h`. This was done to prevent rebuilds of the entire MicroPython sources whenever a Pycardium module is changed. This leads to issues where QSTRs got out of sync and weird errors like the following could happen: import foo_module Exception: No module `abc_def` (a different string than expected) Attempt to fix this by only updating the QSTR header when the module-header actually changes. For this, a few workarounds are needed: - Replace symlinks with actual copied files so timestamps change on updates. - Add a hack so meson picks up on the dependency of the file in genhdr/ - Rename the outer file so older meson versions don't complain about multiple targets with the same name. Co-authored-by:
dx <dequis@dequis.org> Signed-off-by:
Rahix <rahix@rahix.de>
-
dx authored
See merge request card10/firmware!289
-
dx authored
pycardium/utime: add unix_time and unix_time_ms See merge request card10/firmware!290
-
schneider authored
Update BLE bianry blob, patch it and turn off encryption when needed See merge request card10/firmware!319
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
- Oct 03, 2019
-
-
rahix authored
See merge request card10/firmware!103
-
Signed-off-by:
Mateusz Zalega <mateusz@appliedsourcery.com>
-
rahix authored
Closes #171 See merge request card10/firmware!323
-
rahix authored
When MXC_ASSERT is disabled, the portexpander_config() call is not compiled into the bootloader which leads to the portexpander not being setup correctly and thus neither the screen turns on nor does the button to switch into MSC mode work correctly (bootloader always goes into MSC mode). Fix this by moving the portexpander_config() call outside the MXC_ASSERT and only keep the return value check inside. Additionally fix the pull-up/pull-down selection in portexpander_config() not being set correctly. Ref #171 Signed-off-by:
Rahix <rahix@rahix.de>
-
- Oct 01, 2019
-
-
rahix authored
See merge request card10/firmware!320
-
baldo authored
* Add git as a build dependency to allow detecting git hash.
-
Tobias Schneider authored
-
schneider authored
-
schneider authored
-
schneider authored
-
schneider authored
-
Tobias Schneider authored
-
- Sep 25, 2019
-
-
Ferdinand Bachmann authored
-
- Sep 24, 2019
-
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
The transparent background patch messes up the display for the BME680 app. This patch uses proper formatting codes which will make the output readable again. Signed-off-by:
Rahix <rahix@rahix.de>
-
- Sep 22, 2019
-
-
rahix authored
See merge request card10/firmware!296
-
New Button-Layout ================= /-----------------------\ | xxxxxxxxxxxxxxxxx | | | | <> * Pause screen | card10 | +------- <> <> * During pause: Scroll right. | | | * Short press: Toggle between Finger | \-----------------------/ and USB. * During pause: Scroll left. * Long press: Toggle bias on/off. * Short press: Toggle LED mode. * Long press: Start/stop logging. Other Changes ============= - Split the bar into negativ [10:5] and positive [5:0] scale and update them seperate to have a better visualization. - Blink red with backside LEDs on detected pulse. - Allow toggling the LED modes on and off (see new button layout). - Lock mode & bias during logging.
-
rahix authored
Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
See merge request card10/firmware!316
-
rahix authored
This patch makes the BHI160 app more pythonic and fixes a few bugs/issues: - An exception (including KeyboardInterrupt) will trigger the sensor to be closed again. Otherwise you'd get strange behavior trying to reopen then afterwards. - Use simple_menu.button_events() instead of home-cooked solution. This should hopefully make the code more future-proof. - Fix overlapping text caused by the font-rendering changes. Signed-off-by:
Rahix <rahix@rahix.de>
-
rahix authored
As discussed in card10/firmware!316, this commit prevents I2C lockup by discarding overflowing samples instead of blocking until they have been read. This is not ideal as the samples read will not be the most recent ones. A deeper refactor of the sensor-stream internal API can fix this in the future. Cc: @flo_h Signed-off-by:
Rahix <rahix@rahix.de>
-
- Sep 21, 2019
-
-
rahix authored
See merge request card10/firmware!285 and card10/firmware#146
-