Skip to content
This repository was archived by the owner on Feb 25, 2021. It is now read-only.

Commit 969467b

Browse files
committed
Don't save the option for sending calibration output in the flash
1 parent dfe573e commit 969467b

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/main.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ void setup( void ) {
211211
Serial.println( WiFi.getMode() == WIFI_AP ? WiFi.softAPIP() : WiFi.localIP() );
212212

213213

214-
steerConfig.sendCalibrationDataFromImu = false;
214+
steerImuInclinometerData.sendCalibrationDataFromImu = false;
215215

216216
labelLoad = ESPUI.addControl( ControlType::Label, "Load:", "", ControlColor::Turquoise );
217217
labelOrientation = ESPUI.addControl( ControlType::Label, "Orientation:", "", ControlColor::Emerald );
@@ -764,9 +764,9 @@ void setup( void ) {
764764
ESPUI.addControl( ControlType::Option, "FXOS8700/FXAS21002", "2", ControlColor::Alizarin, sel );
765765
}
766766
{
767-
ESPUI.addControl( ControlType::Switcher, "Send Calibration Data from IMU to USB", steerConfig.sendCalibrationDataFromImu ? "1" : "0", ControlColor::Peterriver, tab,
767+
ESPUI.addControl( ControlType::Switcher, "Send Calibration Data from IMU to USB", steerImuInclinometerData.sendCalibrationDataFromImu ? "1" : "0", ControlColor::Peterriver, tab,
768768
[]( Control * control, int id ) {
769-
steerConfig.sendCalibrationDataFromImu = control->value.toInt() == 1;
769+
steerImuInclinometerData.sendCalibrationDataFromImu = control->value.toInt() == 1;
770770
} );
771771
}
772772

src/main.hpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,6 @@ struct SteerConfig {
190190

191191
bool invertRoll = false;
192192

193-
bool sendCalibrationDataFromImu = false;
194-
195193
float mountCorrectionImuRoll = 0;
196194
float mountCorrectionImuPitch = 0;
197195
float mountCorrectionImuYaw = 0;
@@ -362,7 +360,7 @@ struct SteerMachineControl {
362360
extern SteerMachineControl steerMachineControl;
363361

364362
struct SteerImuInclinometerData {
365-
// Average<float, float, 10> averageHeading;
363+
bool sendCalibrationDataFromImu = false;
366364

367365
float heading;
368366
float roll;

src/sensor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ void sensorWorker100HzPoller( void* z ) {
378378
xSemaphoreGive( i2cMutex );
379379
}
380380

381-
if ( steerConfig.sendCalibrationDataFromImu ) {
381+
if ( steerImuInclinometerData.sendCalibrationDataFromImu ) {
382382
// Print the sensor data
383383
Serial.print( "Raw:" );
384384
Serial.print( fxos8700.accel_raw.x );

0 commit comments

Comments
 (0)