![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
tiz
Dependencies: TextLCD X_NUCLEO_IKS01A1 func mbed-src mbed
Fork of mas by
Diff: func/Config.cpp
- Revision:
- 6:fb1b3ce7738d
- Parent:
- 5:100310ea8fba
--- a/func/Config.cpp Tue Aug 23 15:59:59 2016 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -#include "Config.h" - -Config::Config(char *filename) -{ - FILE *fp = fopen(filename, "r+"); - if(!fp) - { - raise_error(ERROR_CONFIG); - } - strcpy(this->__filename, filename); - fclose(fp); -} - -void Config::write() -{ - FILE *fp = fopen(this->__filename, "w+"); - if(!fp) - { - raise_error(ERROR_CONFIG); - } - fprintf(fp, "%d %d %d\n%d %d %d\n%d %d %d", this->__acc_offset[0], __acc_offset[1], __acc_offset[2], this->__gyo_offset[0], this->__gyo_offset[1], this->__gyo_offset[2], this->__mag_offset[0], this->__mag_offset[1], this->__mag_offset[2]); - fclose(fp); -} \ No newline at end of file