Switch back to hex representation for UDP message CMD values.
This commit is contained in:
parent
92aad927e1
commit
09109a8f75
10
README.md
10
README.md
|
|
@ -27,7 +27,7 @@ The first and second four byte integers values are 4039196302 and 3194769291 res
|
||||||
| Filter_1 | Value: 4039196302 | Unsigned Int | 32 |
|
| Filter_1 | Value: 4039196302 | Unsigned Int | 32 |
|
||||||
| Filter_2 | Value: 3194769291 | Unsigned Int | 32 |
|
| Filter_2 | Value: 3194769291 | Unsigned Int | 32 |
|
||||||
| MessageID | This is used to identify and ignore duplicate messages. Due to the unreliable nature of UDP, and the slow embedded processors, sending multiple duplicate messages some few milliseconds (10) apart can help ensure the devices get all their messages | Unsigned Int | 32 |
|
| MessageID | This is used to identify and ignore duplicate messages. Due to the unreliable nature of UDP, and the slow embedded processors, sending multiple duplicate messages some few milliseconds (10) apart can help ensure the devices get all their messages | Unsigned Int | 32 |
|
||||||
| CMD | Value: 0 | Unsigned Char | 8 |
|
| CMD | Value: 0x00 | Unsigned Char | 8 |
|
||||||
| TargetID | This is the target ID mask for the broadcast message. | Unsigned Int | 32 |
|
| TargetID | This is the target ID mask for the broadcast message. | Unsigned Int | 32 |
|
||||||
|
|
||||||
### CMD_SETLEVELS
|
### CMD_SETLEVELS
|
||||||
|
|
@ -39,7 +39,7 @@ The first and second four byte integers values are 4039196302 and 3194769291 res
|
||||||
| Filter_1 | Value: 4039196302 | Unsigned Int | 32 |
|
| Filter_1 | Value: 4039196302 | Unsigned Int | 32 |
|
||||||
| Filter_2 | Value: 3194769291 | Unsigned Int | 32 |
|
| Filter_2 | Value: 3194769291 | Unsigned Int | 32 |
|
||||||
| MessageID | This is used to identify and ignore duplicate messages. Due to the unreliable nature of UDP, and the slow embedded processors, sending multiple duplicate messages some few milliseconds (10) apart can help ensure the devices get all their messages | Unsigned Int | 32 |
|
| MessageID | This is used to identify and ignore duplicate messages. Due to the unreliable nature of UDP, and the slow embedded processors, sending multiple duplicate messages some few milliseconds (10) apart can help ensure the devices get all their messages | Unsigned Int | 32 |
|
||||||
| CMD | Value: 1 | Unsigned Char | 8 |
|
| CMD | Value: 0x01 | Unsigned Char | 8 |
|
||||||
| TargetID | This is the target ID mask for the broadcast message. | Unsigned Int | 32 |
|
| TargetID | This is the target ID mask for the broadcast message. | Unsigned Int | 32 |
|
||||||
| RampTime | This is the time in milliseconds over which the color will be changed | Unsigned Int | 32 |
|
| RampTime | This is the time in milliseconds over which the color will be changed | Unsigned Int | 32 |
|
||||||
| Red | This is the level for the "red" GPIO pin. Values from 0 to 255 | Unsigned Char | 8 |
|
| Red | This is the level for the "red" GPIO pin. Values from 0 to 255 | Unsigned Char | 8 |
|
||||||
|
|
@ -59,7 +59,7 @@ The CMD, RampTime and NumColors value/bits are at the head of the message. The n
|
||||||
| Filter_1 | Value: 4039196302 | Unsigned Int | 32 |
|
| Filter_1 | Value: 4039196302 | Unsigned Int | 32 |
|
||||||
| Filter_2 | Value: 3194769291 | Unsigned Int | 32 |
|
| Filter_2 | Value: 3194769291 | Unsigned Int | 32 |
|
||||||
| MessageID | This is used to identify and ignore duplicate messages. Due to the unreliable nature of UDP, and the slow embedded processors, sending multiple duplicate messages some few milliseconds (10) apart can help ensure the devices get all their messages | Unsigned Int | 32 |
|
| MessageID | This is used to identify and ignore duplicate messages. Due to the unreliable nature of UDP, and the slow embedded processors, sending multiple duplicate messages some few milliseconds (10) apart can help ensure the devices get all their messages | Unsigned Int | 32 |
|
||||||
| CMD | Value: 2 | Unsigned Char | 8 |
|
| CMD | Value: 0x02 | Unsigned Char | 8 |
|
||||||
| TargetID | This is the target ID mask for the broadcast message. | Unsigned Int | 32 |
|
| TargetID | This is the target ID mask for the broadcast message. | Unsigned Int | 32 |
|
||||||
| RampTime | This is the time in milliseconds over which the color will be changed | Unsigned Int | 32 |
|
| RampTime | This is the time in milliseconds over which the color will be changed | Unsigned Int | 32 |
|
||||||
| NumColors | This is the number of color triplets in the message | Unsigned Char | 8 |
|
| NumColors | This is the number of color triplets in the message | Unsigned Char | 8 |
|
||||||
|
|
@ -77,7 +77,7 @@ The CMD, RampTime and NumColors value/bits are at the head of the message. The n
|
||||||
| Filter_1 | Value: 4039196302 | Unsigned Int | 32 |
|
| Filter_1 | Value: 4039196302 | Unsigned Int | 32 |
|
||||||
| Filter_2 | Value: 3194769291 | Unsigned Int | 32 |
|
| Filter_2 | Value: 3194769291 | Unsigned Int | 32 |
|
||||||
| MessageID | This is used to identify and ignore duplicate messages. Due to the unreliable nature of UDP, and the slow embedded processors, sending multiple duplicate messages some few milliseconds (10) apart can help ensure the devices get all their messages | Unsigned Int | 32 |
|
| MessageID | This is used to identify and ignore duplicate messages. Due to the unreliable nature of UDP, and the slow embedded processors, sending multiple duplicate messages some few milliseconds (10) apart can help ensure the devices get all their messages | Unsigned Int | 32 |
|
||||||
| CMD | Value: 3 | Unsigned Char | 8 |
|
| CMD | Value: 0x03 | Unsigned Char | 8 |
|
||||||
| TargetID | This is the target ID mask for the broadcast message. | Unsigned Int | 32 |
|
| TargetID | This is the target ID mask for the broadcast message. | Unsigned Int | 32 |
|
||||||
|
|
||||||
### CMD_UPDATESTATUS
|
### CMD_UPDATESTATUS
|
||||||
|
|
@ -89,5 +89,5 @@ From the controller's perspective this command triggers the updateBoardStatus()
|
||||||
| Filter_1 | Value: 4039196302 | Unsigned Int | 32 |
|
| Filter_1 | Value: 4039196302 | Unsigned Int | 32 |
|
||||||
| Filter_2 | Value: 3194769291 | Unsigned Int | 32 |
|
| Filter_2 | Value: 3194769291 | Unsigned Int | 32 |
|
||||||
| MessageID | This is used to identify and ignore duplicate messages. Due to the unreliable nature of UDP, and the slow embedded processors, sending multiple duplicate messages some few milliseconds (10) apart can help ensure the devices get all their messages | Unsigned Int | 32 |
|
| MessageID | This is used to identify and ignore duplicate messages. Due to the unreliable nature of UDP, and the slow embedded processors, sending multiple duplicate messages some few milliseconds (10) apart can help ensure the devices get all their messages | Unsigned Int | 32 |
|
||||||
| CMD | Value: 4 | Unsigned Char | 8 |
|
| CMD | Value: 0x04 | Unsigned Char | 8 |
|
||||||
| TargetID | This is the target ID mask for the broadcast message. | Unsigned Int | 32 |
|
| TargetID | This is the target ID mask for the broadcast message. | Unsigned Int | 32 |
|
||||||
15
src/main.cpp
15
src/main.cpp
|
|
@ -27,15 +27,14 @@ const unsigned int HOSTPORT = 80;
|
||||||
const String STATUSURL = "/l/boardstatus.php";
|
const String STATUSURL = "/l/boardstatus.php";
|
||||||
|
|
||||||
// UDP Command values
|
// UDP Command values
|
||||||
#define CMD_OFF 0
|
#define CMD_OFF 0x00
|
||||||
#define CMD_SETLEVELS 1
|
#define CMD_SETLEVELS 0x01
|
||||||
#define CMD_AUTOPATTERN 2
|
#define CMD_AUTOPATTERN 0x02
|
||||||
#define CMD_AUTODISABLE 3
|
#define CMD_AUTODISABLE 0x03
|
||||||
#define CMD_UPDATESTATUS 4
|
#define CMD_UPDATESTATUS 0x04
|
||||||
|
|
||||||
// Auto-cycler state conditions
|
// Auto-cycler state conditions
|
||||||
#define AUTO_DISABLED 0x00
|
#define AUTO_DISABLED 0x00
|
||||||
#define AUTO_ACTIVE 0x01
|
#define AUTO_ACTIVE 0x01
|
||||||
|
|
||||||
// Maximum analog output level
|
// Maximum analog output level
|
||||||
#define MAX_ANALOG 255
|
#define MAX_ANALOG 255
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user