Skip to content

Commit

Permalink
fix requirements query in windcalc that came in with last time sync c…
Browse files Browse the repository at this point in the history
…hange
  • Loading branch information
iltis42 committed Aug 14, 2024
1 parent 0e30066 commit 029aeaf
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions main/StraightWind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,9 @@ bool StraightWind::calculateWind()
gpsStatus = true;
}
// ESP_LOGI(FNAME,"calculateWind flightMode: %d", CircleStraightWind::getFlightMode() );

if( !(wind_enable.get() & WA_STRAIGHT))
return false;

// Check if straight wind requirements are fulfilled
if( ((compass_enable.get() != CS_I2C || compass_enable.get() != CS_CAN) || compass_calibrated.get() == false) && (wind_enable.get() & WA_STRAIGHT)) {
ESP_LOGI(FNAME,"Compass issues: ENA:%d CAL:%d WIND_ENA:%d, abort", compass_enable.get(), compass_calibrated.get(), wind_enable.get() );
if( ((compass_enable.get() != CS_I2C || compass_enable.get() != CS_CAN) || compass_calibrated.get() == false) || !(wind_enable.get() & WA_STRAIGHT)) {
// ESP_LOGI(FNAME,"Compass issues: ENA:%d CAL:%d WIND_ENA:%d, abort", compass_enable.get(), compass_calibrated.get(), wind_enable.get() );
if( !compass_enable.get() )
status="Comps Dis";
if( !compass_calibrated.get() )
Expand Down

0 comments on commit 029aeaf

Please sign in to comment.