Skip to content

Commit

Permalink
MuscleOxygen: datapages: move numbers to public defines
Browse files Browse the repository at this point in the history
this should be a no-op
  • Loading branch information
cujomalainey committed Feb 6, 2022
1 parent 6d6e12e commit 7f6e535
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 11 deletions.
6 changes: 6 additions & 0 deletions src/Profiles/MuscleOxygen/ANTPLUS_MuscleOxygenDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@

#define ANTPLUS_MUSCLEOXYGEN_FLAGS_BATTERYSTATUS_SUPPORTED (1 << 0)


#define ANTPLUS_MUSCLEOXYGEN_DATAPAGE_MUSCLEOXYGENDATA_NUMBER 1

#define ANTPLUS_MUSCLEOXYGEN_DATAPAGE_MUSCLEOXYGENDATA_TOTALHEMOGLOBINCONCENTRATION_AMBIENTLIGHTOOHIGH 0xFFE
#define ANTPLUS_MUSCLEOXYGEN_DATAPAGE_MUSCLEOXYGENDATA_TOTALHEMOGLOBINCONCENTRATION_INVALID 0xFFF
#define ANTPLUS_MUSCLEOXYGEN_DATAPAGE_MUSCLEOXYGENDATA_PREVIOUSSATURATEDHEMOGLOBINPERCENTAGE_INVALID 0xFFF
#define ANTPLUS_MUSCLEOXYGEN_DATAPAGE_MUSCLEOXYGENDATA_CURRENTSATURATEDHEMOGLOBINPERCENTAGE_INVALID 0xFFF


#define ANTPLUS_MUSCLEOXYGEN_DATAPAGE_COMMANDS_NUMBER 16

#endif // ANTPLUS_MUSCLEOXYGENDEFINES_h
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,4 @@
// 30 / 2.5 = 12
#define MUSCLEOXYGEN_SEARCHTIMEOUT 12

/* Pages */
#define MUSCLEOXYGEN_MUSCLEOXYGENDATA_NUMBER 1
#define MUSCLEOXYGEN_COMMANDS_NUMBER 16

// Base page */
#define ANTPLUS_MUSCLEOXYGEN_DATAPAGEBASE_DATAPAGE_BYTE 0x00

#endif // ANTPLUS_MUSCLEOXYGENPRIVATEDEFINES_h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <Profiles/MuscleOxygen/DataPages/ANTPLUS_MuscleOxygenCommands.h>
#include <Profiles/MuscleOxygen/ANTPLUS_MuscleOxygenPrivateDefines.h>
#include <Profiles/MuscleOxygen/ANTPLUS_MuscleOxygenDefines.h>

#define COMMANDID_BYTE 1
#define RESERVED_BYTE 2
Expand Down Expand Up @@ -36,7 +36,7 @@ MuscleOxygenCommands::MuscleOxygenCommands(AntRxDataResponse& dp) :
MuscleOxygenBaseCommands<BroadcastData>() {}

MuscleOxygenCommandsMsg::MuscleOxygenCommandsMsg() :
MuscleOxygenBaseMainDataPageMsg(MUSCLEOXYGEN_COMMANDS_NUMBER),
MuscleOxygenBaseMainDataPageMsg(ANTPLUS_MUSCLEOXYGEN_DATAPAGE_COMMANDS_NUMBER),
MuscleOxygenBaseCommands<BroadcastDataMsg>() {
set8BitValue(RESERVED_VALUE, RESERVED_BYTE);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ uint16_t MuscleOxygenBaseMuscleOxygenData<T>::getCurrentSaturatedHemoglobinPerce
}

MuscleOxygenMuscleOxygenDataMsg::MuscleOxygenMuscleOxygenDataMsg() :
MuscleOxygenBaseMainDataPageMsg(MUSCLEOXYGEN_MUSCLEOXYGENDATA_NUMBER),
MuscleOxygenBaseMainDataPageMsg(ANTPLUS_MUSCLEOXYGEN_DATAPAGE_MUSCLEOXYGENDATA_NUMBER),
MuscleOxygenBaseMuscleOxygenData<BroadcastDataMsg>() {
setTotalHemoglobinConcentration(
ANTPLUS_MUSCLEOXYGEN_DATAPAGE_MUSCLEOXYGENDATA_TOTALHEMOGLOBINCONCENTRATION_INVALID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void ProfileMuscleOxygenMonitor::setChannelConfig() {

bool ProfileMuscleOxygenMonitor::isDataPageValid(uint8_t dataPage) {
switch (dataPage) {
case MUSCLEOXYGEN_MUSCLEOXYGENDATA_NUMBER:
case ANTPLUS_MUSCLEOXYGEN_DATAPAGE_MUSCLEOXYGENDATA_NUMBER:
case ANTPLUS_COMMON_DATAPAGE_PRODUCTINFORMATION_NUMBER:
case ANTPLUS_COMMON_DATAPAGE_MANUFACTURERSINFORMATION_NUMBER:
return true;
Expand Down

0 comments on commit 7f6e535

Please sign in to comment.