Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Config.cpp
00001 #include "Config.h" 00002 00003 Config::Config(char *filename) 00004 { 00005 FILE *fp = fopen(filename, "r+"); 00006 if(!fp) 00007 { 00008 raise_error(ERROR_CONFIG); 00009 } 00010 strcpy(this->__filename, filename); 00011 fclose(fp); 00012 } 00013 00014 void Config::write() 00015 { 00016 FILE *fp = fopen(this->__filename, "w+"); 00017 if(!fp) 00018 { 00019 raise_error(ERROR_CONFIG); 00020 } 00021 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]); 00022 fclose(fp); 00023 }
Generated on Sat Jul 16 2022 00:03:47 by
1.7.2