Skip to content
Snippets Groups Projects
Commit a7ce4c0c authored by emorgan's avatar emorgan
Browse files

remove battery module reset as doesn't work with hardware

parent ccce8325
No related branches found
No related tags found
No related merge requests found
......@@ -127,23 +127,6 @@ void VizBlock::run()
int loop_start_time = millis();
serial_command();
// The battery charging and power module will switch off automatically unless a certain amount of
// current is drawn. We can keep it on by regularly trigerring a reset input.
_rst_time = millis();
if (_rst_time - _last_rst_time > 20000){
digitalWrite(D0, LOW);
if (!_resetting) {
_resetting = true;
_rst_start_time = _rst_time;
}
if (_rst_time - _rst_start_time > 300) {
digitalWrite(D0, HIGH);
_resetting = false;
_last_rst_time = millis();
}
}
if( _wifi )
{
wifi_connect();
......@@ -204,8 +187,8 @@ void VizBlock::init()
Serial.println(F("VizBlock Node starting up"));
Serial.println("Initialising " + String(_id));
pinMode(D4, OUTPUT);
pinMode(D0, OUTPUT);
digitalWrite(D4, LOW);
WiFi.mode(WIFI_STA);
WiFi.setSleepMode(WIFI_NONE_SLEEP);
......
......@@ -44,10 +44,6 @@ class VizBlock
unsigned long _previous_flashMillis = 0;
const long _flash_interval = 1000; // flash every second when wifi and MQTT are connected
unsigned long _rst_time;
unsigned long _last_rst_time;
unsigned long _rst_start_time;
bool _resetting = false;
Adafruit_MQTT_Client* _mqtt;
Adafruit_MQTT_Subscribe* _device_subscription;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment