Skip to content

Commit

Permalink
Add SCK2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
oscgonfer committed Sep 10, 2024
1 parent 46d08ac commit f8d1d98
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/Sensors/Sensors.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,21 @@
#ifdef SCK22_AIR
#define WITH_SEN5X
#define WITH_URBAN
#define WITH_AS7331
#define WITH_LPS33
#define WITH_AS7331
#define WITH_SCD30
#define WITH_ADS1X15
#define WITH_SFA30
#define WITH_GPS
#endif

#ifdef SCK23_AIR
#define WITH_SEN5X
#define WITH_URBAN
#define WITH_MPL
#define WITH_AS7331
#define WITH_SCD30
#define WITH_ADS1X15
#define WITH_SFA30
#define WITH_GPS
#endif
Expand All @@ -38,8 +48,6 @@
// #define WITH_URBAN // Saves 6408 bytes (none of the urban board sensor will be available, it also disables external SHT3X)
// #define WITH_AS7331 // Saves xxx bytes
// #define WITH_CCS811 // Saves xxx bytes
// #define WITH_LPS33 // Saves xxx bytes
// #define WITH_MPL // Saves xxx bytes
// #define WITH_PMS

// Auxiliary Sensors (ALl this sensors use around 8kb)
Expand Down
5 changes: 5 additions & 0 deletions sam/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ build_flags =
!sh ../tools/git-rev.sh
-D SCK22_AIR

[env:sck23_air]
build_flags =
!sh ../tools/git-rev.sh
-D SCK23_AIR

[env:sck_water]
build_flags =
!sh ../tools/git-rev.sh
Expand Down
14 changes: 14 additions & 0 deletions sam/src/SckBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2042,6 +2042,13 @@ bool SckBase::getReading(OneSensor *wichSensor)
sd_batt_t_offset = -1.0; // DONE
#endif

#ifdef SCK23_AIR // We assume offsets are the same between SCK22 and SCK23
net_usb_t_offset = - 1.25; // DONE
sd_usb_t_offset = -1.3; // DONE
net_batt_t_offset = -1.05; // DONE
sd_batt_t_offset = -1.0; // DONE
#endif

// Correct depending on battery/USB and network/sd card status
if (charger.onUSB) {
if (st.mode == MODE_NET) wichSensor->reading = String(aux_temp + net_usb_t_offset);
Expand Down Expand Up @@ -2074,6 +2081,13 @@ bool SckBase::getReading(OneSensor *wichSensor)
sd_batt_h_offset = 3.4; // DONE
#endif

#ifdef SCK23_AIR // We assume offsets are the same between SCK22 and SCK23
net_usb_h_offset = 3.8; // DONE
sd_usb_h_offset = 4; // DONE
net_batt_h_offset = 3.6; // DONE
sd_batt_h_offset = 3.4; // DONE
#endif

// Correct depending on battery/USB and network/sd card status
if (charger.onUSB) {
if (st.mode == MODE_NET) wichSensor->reading = String(aux_hum + net_usb_h_offset);
Expand Down
2 changes: 2 additions & 0 deletions sam/src/SckBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ class SckBase
const String hardwareVer = "2.1";
#elif defined(SCK22_AIR)
const String hardwareVer = "2.2";
#elif defined(SCK23_AIR)
const String hardwareVer = "2.3";
#else
// TODO At some point this will need to change.
const String hardwareVer = "2.1";
Expand Down

0 comments on commit f8d1d98

Please sign in to comment.