Skip to content

Commit

Permalink
API, python: Add LED color constants from v2.2 of the spec
Browse files Browse the repository at this point in the history
Fixes: #158
Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Feb 12, 2024
1 parent db9e3c4 commit 3a4df4d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/osdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ enum osdp_led_color_e {
OSDP_LED_COLOR_BLUE,
OSDP_LED_COLOR_MAGENTA,
OSDP_LED_COLOR_CYAN,
OSDP_LED_COLOR_WHITE,
OSDP_LED_COLOR_SENTINEL
};

Expand Down
3 changes: 3 additions & 0 deletions python/osdp/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ class CommandLEDColor:
Green = osdp_sys.LED_COLOR_GREEN
Amber = osdp_sys.LED_COLOR_AMBER
Blue = osdp_sys.LED_COLOR_BLUE
Magenta = osdp_sys.LED_COLOR_MAGENTA
Cyan = osdp_sys.LED_COLOR_CYAN
White = osdp_sys.LED_COLOR_WHITE

class CommandFileTxFlags:
Cancel = osdp_sys.CMD_FILE_TX_FLAG_CANCEL
Expand Down
3 changes: 3 additions & 0 deletions python/osdp_sys/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ void pyosdp_add_module_constants(PyObject *module)
ADD_CONST("LED_COLOR_GREEN", OSDP_LED_COLOR_GREEN);
ADD_CONST("LED_COLOR_AMBER", OSDP_LED_COLOR_AMBER);
ADD_CONST("LED_COLOR_BLUE", OSDP_LED_COLOR_BLUE);
ADD_CONST("LED_COLOR_MAGENTA", OSDP_LED_COLOR_MAGENTA);
ADD_CONST("LED_COLOR_CYAN", OSDP_LED_COLOR_CYAN);
ADD_CONST("LED_COLOR_WHITE", OSDP_LED_COLOR_WHITE);

/* enum osdp_event_cardread_format_e */
ADD_CONST("CARD_FMT_RAW_UNSPECIFIED", OSDP_CARD_FMT_RAW_UNSPECIFIED);
Expand Down

0 comments on commit 3a4df4d

Please sign in to comment.