Add ControlMode For Hover
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
This commit is contained in:
@ -40,7 +40,7 @@ Servo esc2;
|
||||
SSD1306 display(0x3c, 5, 4);
|
||||
#endif
|
||||
|
||||
OneWire oneWire(ONE_WIRE_BUS);
|
||||
// OneWire oneWire(ONE_WIRE_BUS);
|
||||
// DallasTemperature sensors(&oneWire); // one instance for all sensrs
|
||||
|
||||
esp_now_peer_info_t remote;
|
||||
@ -49,12 +49,14 @@ float temperature = 0;
|
||||
float voltage = 0;
|
||||
float kmh = 0;
|
||||
|
||||
#ifndef VARIANT_HOVER
|
||||
uint8_t sendTemperature = 0;
|
||||
uint8_t sendTemperatureDecimals = 0;
|
||||
uint8_t sendVoltage = 0;
|
||||
uint8_t sendVoltageDecimals = 0;
|
||||
uint8_t sendSpeed = 0;
|
||||
uint8_t sendSpeedDecimals = 0;
|
||||
#endif
|
||||
|
||||
#include "rpm.h"
|
||||
|
||||
@ -85,6 +87,9 @@ void setBoardOptions(uint8_t options)
|
||||
lightMode = options & 3;
|
||||
lightActive = (options >> 3) & 1;
|
||||
fanMode = (options >> 2) & 3;
|
||||
#ifdef VARIANT_HOVER
|
||||
ctrl_mode = fanMode;
|
||||
#endif
|
||||
}
|
||||
|
||||
// ESPNOW Functions ############################
|
||||
@ -287,6 +292,7 @@ bool manageRemote()
|
||||
|
||||
// end ESPNOW functions
|
||||
|
||||
#ifndef VARIANT_HOVER
|
||||
void checkTemperature()
|
||||
{
|
||||
// sensors.requestTemperatures(); // Send the command to get temperatures
|
||||
@ -338,6 +344,7 @@ void checkVoltage()
|
||||
// Serial.println(batteryVoltage);
|
||||
digitalWrite(voltageEnable, LOW); // change to low
|
||||
}
|
||||
#endif
|
||||
|
||||
void setup()
|
||||
{
|
||||
|
Reference in New Issue
Block a user