Project aiming to make a self-controlled solar reflector
Dependencies: Accelerometer LCD Inverter Algorithm MotorDriver Anemometer GUI ArduinoJson Misc Definitions Pushbutton WebSocketClient temp_fan
Diff: main.cpp
- Revision:
- 35:aa4395b4a1a0
- Parent:
- 32:7b58f5574b7a
--- a/main.cpp Tue Apr 06 22:25:14 2021 +0000 +++ b/main.cpp Thu Apr 15 18:47:41 2021 +0000 @@ -60,6 +60,7 @@ bool flag_aTrack; //Flag for active tracking (0 - offline, 1 - online) bool flag_powerOn = true; float sun_angle; +int pow; //PUSHBUTTONS Pushbutton bt_inc(PIN_BTINC); @@ -178,6 +179,11 @@ lcd.LCD_display(topL,botL); } + pow = (flag_eth) ? inverter->getPower() : -1; + if(pow == -1 || pow > THRESHOLD_PER*MAX_POWER){ + break; + } + if(flag_time) //If delay interval has passed { ane.checkWind(&mode);