Skip to content

Commit

Permalink
reduce logging in deviation class
Browse files Browse the repository at this point in the history
  • Loading branch information
iltis42 committed Jul 1, 2022
1 parent 605713f commit 1d271b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion flash
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#echo "Erasing Flash"
#esptool.py --chip esp32 -p /dev/ttyUSB0 -b 460800 erase_flash
#echo "Flashing $1"
esptool.py --chip esp32 -p /dev/ttyUSB0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x8000 ./build/partition_table/partition-table.bin 0xd000 ./build/ota_data_initial.bin 0x1000 ./build/bootloader/bootloader.bin 0x10000 $1
esptool.py --chip esp32 -p /dev/ttyUSB1 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x8000 ./build/partition_table/partition-table.bin 0xd000 ./build/ota_data_initial.bin 0x1000 ./build/bootloader/bootloader.bin 0x10000 $1
6 changes: 3 additions & 3 deletions main/Deviation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ bool Deviation::newDeviation( float measured_heading, float desired_heading, boo
}
}
if( tbe != std::end(devmap) ){
ESP_LOGI( FNAME, "Now erase from map dev for heading=%.1f", tbe->first*0.1 );
// ESP_LOGI( FNAME, "Now erase from map dev for heading=%.1f", tbe->first*0.1 );
devmap.erase(tbe);
}

Expand All @@ -152,11 +152,11 @@ bool Deviation::newDeviation( float measured_heading, float desired_heading, boo
// ESP_LOGI( FNAME, "old_dev %2.3f, delta %f, delta*k %f, new dev: %f", old_dev, delta, delta*k, old_dev + (delta * k) );
devmap[ (int)(measured_heading*10.0 + 0.5) ] = old_dev + (delta * k); // insert the new low pass filtered element
}
// #ifdef VERBOSE_LOG
#ifdef VERBOSE_LOG
for(auto itx = std::begin(devmap); itx != std::end(devmap); ++itx ){
ESP_LOGI( FNAME, "NEW Dev MAP Head: %.1f Dev: %.2f", itx->first*0.1, itx->second );
}
// #endif
#endif
xSemaphoreGive(splineMutex);
recalcInterpolationSpline();
//double new_dev = (*deviationSpline)((double)measured_heading);
Expand Down

0 comments on commit 1d271b0

Please sign in to comment.