firmware merge requestshttps://git.flow3r.garden/card10/firmware/-/merge_requests2020-12-24T21:39:59Zhttps://git.flow3r.garden/card10/firmware/-/merge_requests/380BSEC support2020-12-24T21:39:59ZschneiderBSEC supportAdds basic Bosch BSEC support.
BSEC is a proprietary library from Bosch which uses the BME680 to calculate an estimation of an "Indoor Air Quality". It takes complete control of the BME680 and performs a measurement every 3 seconds. Thi...Adds basic Bosch BSEC support.
BSEC is a proprietary library from Bosch which uses the BME680 to calculate an estimation of an "Indoor Air Quality". It takes complete control of the BME680 and performs a measurement every 3 seconds. This consumes about 0.9 mA on the 1.8 V rail. A later iteration of this driver might also allow to change the interval to 300 seconds to save energy.
Two configuration options are introduced. One to enable the driver (as it is a binary blob) and one to enable the debug prints of the driver. If the library is active, calls to the BME680 API will stop using the sensor directly and return a subset of the data gathered by the BSEC library.
You can use this https://phyphox.org/ "experiment" to access the data:
![download__1_](/uploads/c5fc1dfc1189e56491730c21b2ee2bf2/download__1_.png)
![cwNiWbhBMDGanPdkseSkGBCn](/uploads/d6d4fed5084a53e2398a7f1087218575/cwNiWbhBMDGanPdkseSkGBCn.png)
In addition the pycardium BME680 API and the BLE Environmental Sensing Service have been extended.https://git.flow3r.garden/card10/firmware/-/merge_requests/384Upgrade to micropython v1.122020-06-13T07:18:10Zrahixcard10@rahix.deUpgrade to micropython v1.12No obvious regression up to MicroPython v1.12 ([Changelog](https://github.com/micropython/micropython/releases/tag/v1.12)). I did not yet have time to thoroughly test it though ...
I intentionally did not do any further adjustments yet...No obvious regression up to MicroPython v1.12 ([Changelog](https://github.com/micropython/micropython/releases/tag/v1.12)). I did not yet have time to thoroughly test it though ...
I intentionally did not do any further adjustments yet, to e.g. make use of new features. These will follow up in separate MRs.v1.16schneiderschneiderhttps://git.flow3r.garden/card10/firmware/-/merge_requests/388change(micropython): Create weak link from `(u)module` to `module`2020-06-15T17:55:54Zschneiderchange(micropython): Create weak link from `(u)module` to `module`Create weak links from MicroPython specific implementations of
modules to standard names. I.e. allow `import time` to import
utime module.Create weak links from MicroPython specific implementations of
modules to standard names. I.e. allow `import time` to import
utime module.rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/414SpO2 sensor improvements2020-10-17T13:16:33ZschneiderSpO2 sensor improvementsWhat is currently in master can only be viewed as broken. This branch is so much better that it should not be left out.
I've added a warning screen in the beginning to inform that it is for demonstration only and that the values are kno...What is currently in master can only be viewed as broken. This branch is so much better that it should not be left out.
I've added a warning screen in the beginning to inform that it is for demonstration only and that the values are known to be incorrect.v1.16rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/417Pycardium Improvements2020-10-17T12:24:52Zrahixcard10@rahix.dePycardium ImprovementsVarious pycardium improvements, most notably a fix for #212. See the individual commits for details.Various pycardium improvements, most notably a fix for #212. See the individual commits for details.v1.16schneiderschneiderhttps://git.flow3r.garden/card10/firmware/-/merge_requests/424feat(simple_menu): Make scroll buttons configurable2020-11-06T12:46:47ZPhilip Stewartfeat(simple_menu): Make scroll buttons configurableThis introduces a config flag to make the right buttons scrollable.
I wasn't sure if I should just remove the old option in SimpleMenu but left it for backwards compatibility. If the config is set, it overwrites the SimpleMenu option.
I...This introduces a config flag to make the right buttons scrollable.
I wasn't sure if I should just remove the old option in SimpleMenu but left it for backwards compatibility. If the config is set, it overwrites the SimpleMenu option.
I tested it with the main menu and the menu in the ecg app.
Fixes #204v1.16https://git.flow3r.garden/card10/firmware/-/merge_requests/470Add epic_fs_is_attached(), os.fs_is_attached(), and make the menu automatical...2021-04-07T19:41:09Zrahixcard10@rahix.deAdd epic_fs_is_attached(), os.fs_is_attached(), and make the menu automatically return from USB modeAdd a new API call to check whether the filesystem is attached to card10 or to a connected USB host (in which case it is unavailable to card10). Make the menu check this and automatically exit "USB storage mode" when a host ejects the d...Add a new API call to check whether the filesystem is attached to card10 or to a connected USB host (in which case it is unavailable to card10). Make the menu check this and automatically exit "USB storage mode" when a host ejects the device.v1.18schneiderschneiderhttps://git.flow3r.garden/card10/firmware/-/merge_requests/473CTX Rendering2021-09-19T14:45:58Zrahixcard10@rahix.deCTX RenderingSo, I decided to push the current state of my ctx integration work here to have a place to
track the progress where other's can also provide feedback instead of just me
hacking away on my own.
I tried to keep the changeset as clean as p...So, I decided to push the current state of my ctx integration work here to have a place to
track the progress where other's can also provide feedback instead of just me
hacking away on my own.
I tried to keep the changeset as clean as possible so it should be easy to
follow along by looking at the individual commits.
Once again, huge thanks to pippin for the [_ctx_ library](https://ctx.graphics/)!
## Current Status
Right now, basic integration on _Epicardium_ side is done. This means that all
rendering in Epicardium is now done via _ctx_, ~~with one notable exception being
the `epic_disp_blit()` function~~ (this is now resolved!).
So far, no Epicardium API for _ctx_ exists yet, instead all the existing drawing
API calls were updated to use _ctx_ under the hood. This provides nice insight
into where visual regressions are happening - Mostly it is looking pretty good
already, though :) Here's a few pictures (left is _ctx_ but I hope that's obvious):
<details><summary><b>Click to expand comparison pictures</b></summary>
![splash](/uploads/007b51ab80a9b9be28e36da63fb9759c/splash.png)
![menu](/uploads/b0440cdc7f5a6a9e5c4b97e790e0ede5/menu.png)
![text](/uploads/5fdf9dc2085cb4b258dbd4c9632ef5cf/text.png)
![mm1](/uploads/a08c770c019f6ec5e9e945e1ad989890/mm1.png)
![mm2](/uploads/562f2bd9f12c88d139f8e00cfe17b601/mm2.png)
</details>
The next step will be to refactor the `epic_disp_blit()` function so it does not
depend on _gfx_ anymore and once that's done, I'll start working on the
Pycardium side and Epicardium API for _ctx_.
## Known Bugs/Regressions
Here is a list of visual artifacts I came across so far. This is mostly for
reference - we should evaluate whether it is worth fixing them or whether we
accept that some legacy code will look slightly off.
- [x] I am unsure what exactly is going on but it seems that pixels set by
`ctx_set_pixel_u8()` are slightly less bright than e.g. those from
a rectangle. For example, notice the few manually written pixels on the end
of each 7-segment segment:
<details><summary>Click to show example picture</summary>
![pixel-color](/uploads/ef9fe6a756c034c9dfa4a93828150652/pixel-color.jpg)
</details>
- [ ] Some `simple_menu` based apps with custom row rendering code will look wrong (background color does not strech to the right screen border). I fixed this for the `personal_state` app, but I am not sure whether there is a viable solution for everything else...
- [ ] `epic_disp_print()` and `epic_disp_print_adv()` no longer wrap text at the screen border.
- [x] This circle appears cut off:
```python
d.clear().circ(80, 40, 30, col=color.CAMPGREEN).update()
```
<details><summary>Click to show example picture</summary>
![IMG_20210525_121708](/uploads/d3cc7efe1f153fe2be887393795c15c8/IMG_20210525_121708.jpg)
</details>
- [x] A pattern of rectangles which "touch" but don't overlap leaves stripes between them:
```python
d.clear()
for i in range(40):
d.rect(10, i * 2, 150, i * 2 + 1, col=color.WHITE)
d.update()
```
<details><summary>Click to show example picture</summary>
![IMG_20210525_122737](/uploads/b57197db3fe87db1a1d3585cbc6dd31f/IMG_20210525_122737.jpg)
</details>
- [ ] [xeyes](https://badge.team/projects/xeyes) needs to visit a doctor ASAP! I believe this comes from xeyes overdrawing the previous pupil in white before redrawing the new one.
<details><summary>Click to show example picture</summary>
![IMG_20210525_123242](/uploads/7cbdb53ce965685e99cefe0b98455ab1/IMG_20210525_123242.jpg)
</details>
- [x] For everything else which I found so far, I already added workarounds ;)
Cc: @schneider
Cc: @pippinhttps://git.flow3r.garden/card10/firmware/-/merge_requests/475change(pycardium): Switch systick to 32 kHz clock source2021-09-16T18:05:10Zschneiderchange(pycardium): Switch systick to 32 kHz clock sourceThis is in perparation of epicardium being allowed to change the system
clock source. By using the alternate clock source for the systick, we
can keep accurate (tick) time on pycardium.This is in perparation of epicardium being allowed to change the system
clock source. By using the alternate clock source for the systick, we
can keep accurate (tick) time on pycardium.rahixcard10@rahix.derahixcard10@rahix.dehttps://git.flow3r.garden/card10/firmware/-/merge_requests/502Revert "feat(micropython): Print exceptions to the screen"2021-12-25T16:43:28Zrahixcard10@rahix.deRevert "feat(micropython): Print exceptions to the screen"https://git.flow3r.garden/card10/firmware/-/merge_requests/506pycardium: Enable f-strings2021-12-25T18:33:26Zrahixcard10@rahix.depycardium: Enable f-stringsNobody noticed by MicroPython 1.17 brings f-strings. Let's enable them!Nobody noticed by MicroPython 1.17 brings f-strings. Let's enable them!schneiderschneider