ampel-firmware issueshttps://transfer.hft-stuttgart.de/gitlab/co2ampel/ampel-firmware/-/issues2021-06-07T08:04:19Zhttps://transfer.hft-stuttgart.de/gitlab/co2ampel/ampel-firmware/-/issues/3Calibration / reset interplay2021-06-07T08:04:19ZKäpplerCalibration / reset interplayI'm sorry for apparently breaking the forced calibration with commit
fe0234280e1160ce35914d02293182f94fb09e04.
While investigating, I found an interesting behaviour of the SCD30
that I would like to share / discuss.
It seems the breakage...I'm sorry for apparently breaking the forced calibration with commit
fe0234280e1160ce35914d02293182f94fb09e04.
While investigating, I found an interesting behaviour of the SCD30
that I would like to share / discuss.
It seems the breakage causes from the fact that the calibration value is not stored,
if the sensor is reset before carrying out at least one measurement after calibration.
The [interface datasheet](https://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/9.5_CO2/Sensirion_CO2_Sensors_SCD30_Interface_Description.pdf) has an interesting note:
> After soft reset the sensor will reload all calibrated data. However, it is worth noting that the sensor reloads calibration data prior to every measurement by default. This includes previously set reference values from ASC or FRC as well as temperature offset values last setting
However, the exact meaning of this paragraph is ambiguous and I'm not sure if it is related to the
mentioned issue.
You can reproduce the behaviour from the branch [dev/debugcalib](https://transfer.hft-stuttgart.de/gitlab/michael_kaeppler/ampel-firmware/-/tree/dev/debugcalib) in my fork. There I added an additional command `resetscd` to the serial console
and deactivated the automatic ESP reset after calibration.
Then do:
```
timer 10
calibrate! 1200
resetscd
```
-> The sensor does output a value based on the previous stored calibration.
If you try
```
timer 10
calibrate! 1200
```
(wait for a measurement)
```
resetscd
```
-> the sensor does output 1200 ppmhttps://transfer.hft-stuttgart.de/gitlab/co2ampel/ampel-firmware/-/issues/2Clean up repository structure2021-05-10T10:03:17ZKäpplerClean up repository structureThe Ampel sourcecode currently lives in a subdirectory `ampel-firmware`, which means that
after cloning the repo the path to the code files is e.g.
`ampel-firmware/ampel-firmware/foo.cpp`
and for the libraries
`ampel-firmware/ampel-f...The Ampel sourcecode currently lives in a subdirectory `ampel-firmware`, which means that
after cloning the repo the path to the code files is e.g.
`ampel-firmware/ampel-firmware/foo.cpp`
and for the libraries
`ampel-firmware/ampel-firmware/src/lib/*`
Is there a reason for this complicated structure?
I would propose to have the main source code in
`ampel-firmware/src/`
and the libs in
`ampel-firmware/src/lib/`
instead.