Skip to content

Commit

Permalink
Merge pull request #129 from thooge/master
Browse files Browse the repository at this point in the history
Some small typo fixes
  • Loading branch information
norbert-walter authored Jan 4, 2025
2 parents 707ac9b + 6637b80 commit b91f345
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/obp60task/OBP60Hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#define TONE3 3500 // 3500Hz
#define TONE4 4000 // 4000Hz
// Analog Input
#define OBP_ANALOG0 4 // Analog input for voltage power supplay
#define OBP_ANALOG0 4 // Analog input for voltage power supply
#define MIN_VOLTAGE 10.0 // Min voltage for under voltage detection (then goto deep sleep)
#define POWER_FAIL_TIME 2 // in [ms] Accept min voltage until 2 x 1ms (for under voltage gaps by engine start)
// Touch buttons
Expand All @@ -69,7 +69,7 @@
#define NUM_FLASH_LED 1 // Number of flash LED
#define OBP_FLASH_LED 7 // GPIO port
// Backlight LEDs (6x WS2812B)
#define NUM_BACKLIGHT_LED 6 // Numebr of Backlight LEDs
#define NUM_BACKLIGHT_LED 6 // Number of Backlight LEDs
#define OBP_BACKLIGHT_LED 15 // GPIO port
// Power Rail
#define OBP_POWER_50 5 // 5.0V power rail
Expand Down
2 changes: 1 addition & 1 deletion lib/obp60task/OBPSensorTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ void sensorTask(void *param){
}
}

// Send supplay voltage value all 1s
// Send supply voltage value all 1s
if(millis() > starttime5 + 1000 && String(powsensor1) == "off"){
starttime5 = millis();
sensors.batteryVoltage = (float(analogRead(OBP_ANALOG0)) * 3.3 / 4096 + 0.17) * 20; // Vin = 1/20
Expand Down
2 changes: 1 addition & 1 deletion lib/obp60task/obp60task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ void underVoltageDetection(GwApi *api, CommonData &common){
// Read settings
float vslope = uint(api->getConfig()->getConfigItem(api->getConfig()->vSlope,true)->asFloat());
float voffset = uint(api->getConfig()->getConfigItem(api->getConfig()->vOffset,true)->asFloat());
// Read supplay voltage
// Read supply voltage
float actVoltage = (float(analogRead(OBP_ANALOG0)) * 3.3 / 4096 + 0.17) * 20; // V = 1/20 * Vin
actVoltage = actVoltage * vslope + voffset;
if(actVoltage < MIN_VOLTAGE){
Expand Down

0 comments on commit b91f345

Please sign in to comment.