Compare commits

...

6 Commits
3.4.0 ... 3.4.1

Author SHA1 Message Date
Samuel Siburian
23f8c383fd Merge pull request #345 from airgradienthq/feat/print-s8-info
Print S8 sensor information
2025-10-02 19:22:22 +07:00
samuelbles07
c0ad1dbfad Print S8 sensor information 2025-10-02 19:18:59 +07:00
Samuel Siburian
75be7d9fc5 Merge pull request #342 from mtlynch/no-trailing-spaces
Eliminate trailing whitespace
2025-09-25 13:45:11 +07:00
Samuel Siburian
309d322100 Merge pull request #343 from sysboy/typo-fix-failuire
Simple typo fix
2025-09-25 11:37:54 +07:00
Steve
89ebe6c39f Simple typo fix 2025-09-23 15:40:36 +01:00
Michael Lynch
29db5469f5 Eliminate trailing whitespace 2025-09-17 20:06:50 -04:00
29 changed files with 165 additions and 121 deletions

View File

@@ -1,5 +1,36 @@
on: [push, pull_request]
jobs:
trailing-whitespace:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Check for trailing whitespace
run: |
set -u
# Don't enforce checks on vendored libraries.
readonly EXCLUDED_DIR='src/Libraries'
has_trailing_whitespace=false
while read -r line; do
if grep \
"\s$" \
--line-number \
--with-filename \
--binary-files=without-match \
"${line}"; then
has_trailing_whitespace=true
fi
done < <(git ls-files | grep --invert-match "^${EXCLUDED_DIR}/")
if [ "$has_trailing_whitespace" = true ]; then
echo "ERROR: Found trailing whitespace"
exit 1
fi
compile:
strategy:
fail-fast: false

View File

@@ -294,7 +294,7 @@ static bool sgp41Init(void) {
configuration.hasSensorSGP = true;
return true;
} else {
Serial.println("Init SGP41 failuire");
Serial.println("Init SGP41 failure");
configuration.hasSensorSGP = false;
}
return false;

View File

@@ -351,7 +351,7 @@ static bool sgp41Init(void) {
configuration.hasSensorSGP = true;
return true;
} else {
Serial.println("Init SGP41 failuire");
Serial.println("Init SGP41 failure");
configuration.hasSensorSGP = false;
}
return false;

View File

@@ -374,7 +374,7 @@ static bool sgp41Init(void) {
configuration.hasSensorSGP = true;
return true;
} else {
Serial.println("Init SGP41 failuire");
Serial.println("Init SGP41 failure");
configuration.hasSensorSGP = false;
}
return false;

View File

@@ -559,7 +559,7 @@ static bool sgp41Init(void) {
configuration.hasSensorSGP = true;
return true;
} else {
Serial.println("Init SGP41 failuire");
Serial.println("Init SGP41 failure");
configuration.hasSensorSGP = false;
}
return false;
@@ -952,6 +952,8 @@ static void boardInit(void) {
} else {
Serial.println("Set S8 AbcDays failure");
}
ag->s8.printInformation();
}
localServer.setFwMode(fwMode);

View File

@@ -835,3 +835,13 @@ bool S8::setAbcPeriod(int hours) {
* @return int Hour
*/
int S8::getAbcPeriod(void) { return getCalibPeriodABC(); }
void S8::printInformation(void) {
Serial.print("S8 type ID: 0x");
Serial.println(getSensorTypeId(), HEX);
Serial.print("S8 serial number: 0x");
Serial.println(getSensorId(), HEX);
Serial.print("S8 memory map version: 0x");
Serial.println(getMemoryMapVersion(), HEX);
}

View File

@@ -80,6 +80,7 @@ public:
bool isBaseLineCalibrationDone(void);
bool setAbcPeriod(int hours);
int getAbcPeriod(void);
void printInformation(void);
private:
/** Variables */