Reduce future maintenance of source type special

This commit is contained in:
elecpower
2021-12-31 10:53:10 +01:00
committed by Raphael Coeffic
parent 0421774a68
commit 0857c5d9ea
6 changed files with 39 additions and 19 deletions
+18 -1
View File
@@ -178,8 +178,25 @@ enum RawSourceType {
MAX_SOURCE_TYPE
};
enum RawSourceTypeSpecial {
SOURCE_TYPE_SPECIAL_TX_BATT,
SOURCE_TYPE_SPECIAL_TX_TIME,
SOURCE_TYPE_SPECIAL_TX_GPS,
SOURCE_TYPE_SPECIAL_FIRST_RESERVED,
SOURCE_TYPE_SPECIAL_RESERVED1 = SOURCE_TYPE_SPECIAL_FIRST_RESERVED,
SOURCE_TYPE_SPECIAL_RESERVED2,
SOURCE_TYPE_SPECIAL_RESERVED3,
SOURCE_TYPE_SPECIAL_RESERVED4,
SOURCE_TYPE_SPECIAL_LAST_RESERVED = SOURCE_TYPE_SPECIAL_RESERVED4,
SOURCE_TYPE_SPECIAL_FIRST_TIMER,
SOURCE_TYPE_SPECIAL_TIMER1 = SOURCE_TYPE_SPECIAL_FIRST_TIMER,
SOURCE_TYPE_SPECIAL_TIMER2,
SOURCE_TYPE_SPECIAL_TIMER3,
SOURCE_TYPE_SPECIAL_LAST_TIMER = SOURCE_TYPE_SPECIAL_TIMER3,
SOURCE_TYPE_SPECIAL_COUNT
};
constexpr int SOURCE_TYPE_STICK_THR_IDX { 3 }; // TODO is there a function to determine index?
constexpr int SOURCE_TYPE_SPECIAL_TIMER1_IDX { 3 }; // TODO temp const until Timers own source type
class RawSourceRange
{