Skip to content

Commit

Permalink
Disable charge timers. 10 s delay after power_off.
Browse files Browse the repository at this point in the history
  • Loading branch information
oploc committed Dec 11, 2023
1 parent 3e8432f commit 2a1872c
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions fw/AIRDOS04/AIRDOS04.ino
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ void setup()
Wire.beginTransmission(0x6A); // I2C address
Wire.write((uint8_t)0x14); // Start register
Wire.write((uint8_t)0b00100010);
Wire.write((uint8_t)0b00011101);
Wire.write((uint8_t)0b00011001);
Wire.write((uint8_t)0b10100000);
Wire.write((uint8_t)0b01010110);
Wire.write((uint8_t)0b00000000);
Expand All @@ -401,6 +401,21 @@ void setup()
Wire.write((uint8_t)0b10001100); // ADC
Wire.endTransmission();

/* DEBUG VBUS voltage
uint8_t vbus;
while(true)
{
// Is VBUS (USB) present?
Wire.beginTransmission(0x6A); // ADC of VBUS
Wire.write(0x2D); // MSB 0.264 V/bit
Wire.endTransmission();
Wire.requestFrom(0x6A, 1);
vbus = Wire.read() & 0x7F;
Serial1.println(vbus);
delay(1000);
}
//*/

boolean SDreader = false;
if (digitalRead(ACONNECT)) // Analog board disconnected
{
Expand Down Expand Up @@ -714,7 +729,8 @@ void loop()
Wire.write((uint8_t)0x18); // Start register
Wire.write((uint8_t)0x0A); //
Wire.endTransmission();
while(true);
delay(10000);
//while(true);
};

digitalWrite(DRESET, HIGH);
Expand Down

0 comments on commit 2a1872c

Please sign in to comment.