OnePointDemo ActionFlags Macros (#1451)

* actionflags

* more macros

* distinguish enums better

* PR Suggestions

* Update src/code/z_camera_data.inc.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* Update src/code/z_camera_data.inc.c

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
engineer124
2022-12-11 22:18:36 -05:00
committed by GitHub
parent 2e9e895bf9
commit da06e9a701
5 changed files with 3803 additions and 401 deletions
+27
View File
@@ -1221,6 +1221,33 @@ typedef struct {
{ fov, CAM_DATA_FOV }, \
{ interfaceField, CAM_DATA_INTERFACE_FIELD }
typedef enum {
/* 0x1 */ ONEPOINT_CS_ACTION_ID_1 = 1,
/* 0x2 */ ONEPOINT_CS_ACTION_ID_2,
/* 0x3 */ ONEPOINT_CS_ACTION_ID_3,
/* 0x4 */ ONEPOINT_CS_ACTION_ID_4,
/* 0x9 */ ONEPOINT_CS_ACTION_ID_9 = 9,
/* 0xA */ ONEPOINT_CS_ACTION_ID_10,
/* 0xB */ ONEPOINT_CS_ACTION_ID_11,
/* 0xC */ ONEPOINT_CS_ACTION_ID_12,
/* 0xD */ ONEPOINT_CS_ACTION_ID_13,
/* 0xF */ ONEPOINT_CS_ACTION_ID_15 = 15,
/* 0x10 */ ONEPOINT_CS_ACTION_ID_16,
/* 0x11 */ ONEPOINT_CS_ACTION_ID_17,
/* 0x12 */ ONEPOINT_CS_ACTION_ID_18,
/* 0x13 */ ONEPOINT_CS_ACTION_ID_19,
/* 0x15 */ ONEPOINT_CS_ACTION_ID_21 = 21,
/* 0x18 */ ONEPOINT_CS_ACTION_ID_24 = 24
} OnePointCsAction;
#define ONEPOINT_CS_ACTION_FLAG_40 0x40
#define ONEPOINT_CS_ACTION_FLAG_BGCHECK 0x80
#define ONEPOINT_CS_ACTION(action, isBit40, checkBg) \
(((action) & 0x1F) | ((isBit40) ? ONEPOINT_CS_ACTION_FLAG_40 : 0) | ((checkBg) ? ONEPOINT_CS_ACTION_FLAG_BGCHECK : 0))
#define ONEPOINT_CS_GET_ACTION(onePointCsFull) ((onePointCsFull)->actionFlags & 0x1F)
/** initFlags
* & 0x00FF = atInitFlags
* & 0xFF00 = eyeInitFlags