Mercurial > public > ostc4
view Small_CPU/Inc/compass.h @ 1046:1d7c7a36df15 GasConsumption
Bugfix OSTC5 BT and enabling fast mode:
The OSTC5 BT was operating at default speed of 115200. To enable the faster communication some init steps have been added to set speed to 460800. Having the UART enabled while the module was shut down caused problems during initialisation. To avoid these the BT UART is now initialized after the the module is powered on and deinitialized while the module is switched off.
| author | Ideenmodellierer |
|---|---|
| date | Fri, 14 Nov 2025 18:54:20 +0100 |
| parents | 5f11787b4f42 |
| children |
line wrap: on
line source
/* Define to prevent recursive inclusion -------------------------------------*/ #ifndef COMPASS_H #define COMPASS_H #include <stdint.h> void compass_init(uint8_t fast, uint8_t gain); void accelerator_init(void); void compass_read(void); void acceleration_read(void); int compass_calib(void); void compass_calc(void); //void compass_calc_mini_during_calibration(void); float check_compass_calib(void); void compass_sleep(void); void accelerator_sleep(void); #endif /* COMPASS_H */
