reordering the directory structure

This commit is contained in:
sharandac
2020-07-29 07:55:09 +02:00
parent 7873331c59
commit 25cabd13b0
62 changed files with 126 additions and 63 deletions

View File

@@ -113,7 +113,7 @@ void bma_save_config( void ) {
fs::File file = SPIFFS.open( BMA_COFIG_FILE, FILE_WRITE );
if ( !file ) {
Serial.printf("Can't save file: %s\r\n", BMA_COFIG_FILE );
Serial.printf( __FILE__ "Can't save file: %s\r\n", BMA_COFIG_FILE );
}
else {
file.write( (uint8_t *)bma_config, sizeof( bma_config ) );
@@ -128,12 +128,12 @@ void bma_read_config( void ) {
fs::File file = SPIFFS.open( BMA_COFIG_FILE, FILE_READ );
if (!file) {
Serial.printf("Can't open file: %s!\r\n", BMA_COFIG_FILE );
Serial.printf( __FILE__ "Can't open file: %s!\r\n", BMA_COFIG_FILE );
}
else {
int filesize = file.size();
if ( filesize > sizeof( bma_config ) ) {
Serial.printf("Failed to read configfile. Wrong filesize!\r\n" );
Serial.printf( __FILE__ "Failed to read configfile. Wrong filesize!\r\n" );
}
else {
file.read( (uint8_t *)bma_config, filesize );

View File

@@ -96,7 +96,7 @@ void display_save_config( void ) {
fs::File file = SPIFFS.open( DISPLAY_CONFIG_FILE, FILE_WRITE );
if ( !file ) {
Serial.printf("Can't save file: %s\r\n", DISPLAY_CONFIG_FILE );
Serial.printf( __FILE__ "Can't save file: %s\r\n", DISPLAY_CONFIG_FILE );
}
else {
file.write( (uint8_t *)&display_config, sizeof( display_config ) );
@@ -111,12 +111,12 @@ void display_read_config( void ) {
fs::File file = SPIFFS.open( DISPLAY_CONFIG_FILE, FILE_READ );
if (!file) {
Serial.printf("Can't open file: %s!\r\n", DISPLAY_CONFIG_FILE );
Serial.printf( __FILE__ "Can't open file: %s!\r\n", DISPLAY_CONFIG_FILE );
}
else {
int filesize = file.size();
if ( filesize > sizeof( display_config ) ) {
Serial.printf("Failed to read configfile. Wrong filesize!\r\n" );
Serial.printf( __FILE__ "Failed to read configfile. Wrong filesize!\r\n" );
}
else {
file.read( (uint8_t *)&display_config, filesize );

View File

@@ -25,13 +25,13 @@ void pmu_setup( TTGOClass *ttgo ) {
// enable coulumb counter
if ( ttgo->power->EnableCoulombcounter() )
Serial.printf("enable coulumb counter failed!\r\n");
Serial.printf( __FILE__ "enable coulumb counter failed!\r\n");
if ( ttgo->power->setChargingTargetVoltage( AXP202_TARGET_VOL_4_2V ) )
Serial.printf("target voltage set failed!\r\n");
Serial.printf( __FILE__ "target voltage set failed!\r\n");
if ( ttgo->power->setChargeControlCur( 300 ) )
Serial.printf("charge current set failed!\r\n");
Serial.printf( __FILE__ "charge current set failed!\r\n");
if ( ttgo->power->setAdcSamplingRate( AXP_ADC_SAMPLING_RATE_200HZ ) )
Serial.printf("adc sample set failed!\r\n");
Serial.printf( __FILE__ "adc sample set failed!\r\n");
// Turn off unused power
ttgo->power->setPowerOutPut( AXP202_EXTEN, AXP202_OFF );

View File

@@ -106,7 +106,7 @@ void powermgm_loop( TTGOClass *ttgo ) {
powermgm_clear_event( POWERMGM_SILENCE_WAKEUP );
ttgo->power->setDCDC3Voltage( 3000 );
ttgo->power->clearTimerStatus();
ttgo->power->setTimer( 30 );
ttgo->power->setTimer( 60 );
setCpuFrequencyMhz( 10 );
gpio_wakeup_enable ((gpio_num_t)AXP202_INT, GPIO_INTR_LOW_LEVEL);
gpio_wakeup_enable ((gpio_num_t)BMA423_INT1, GPIO_INTR_HIGH_LEVEL);