|
39 | 39 | #define DISPLAY_UNKNOWN_COMMANDS 0 |
40 | 40 | #define DISPLAY_VC_STATE 0 |
41 | 41 | #define DUMP_RADIO_TO_PC 0 |
42 | | -#define SEND_ATC_COMMAND 1 |
43 | 42 |
|
44 | 43 | #define QUEUE_T uint32_t |
45 | 44 | #define QUEUE_T_BITS ((int)(sizeof(QUEUE_T) * 8)) |
@@ -93,56 +92,29 @@ typedef enum |
93 | 92 | CMD_ATI11 = 0, //Get myVC |
94 | 93 | CMD_ATB, //Break all VC links |
95 | 94 | CMD_ATA, //Get VC status |
| 95 | + |
| 96 | + //Connect to the remote radio |
96 | 97 | CMD_AT_CMDVC, //Select target VC |
97 | 98 | CMD_ATC, //Start the 3-way handshake |
98 | 99 | CMD_WAIT_CONNECTED, //Wait until the client is connected |
| 100 | + |
| 101 | + //Get remote radio connection status, type and ID |
99 | 102 | CMD_AT_CMDVC_2, //Select target VC |
100 | 103 | CMD_ATI12, //Get the VC state |
101 | | - CMD_GET_SERVER_MODEL, //Get the model name |
102 | | - CMD_GET_CLIENT_MODEL, //Get the model name |
103 | 104 | CMD_ATI, //Get the device type |
104 | 105 | CMD_ATI8, //Get the radio's unique ID |
105 | | - CMD_AT_DISABLE_CONTROLLER, //Disable the sprinkler controller |
106 | | - CMD_AT_DAY_OF_WEEK, //Set the day of week |
107 | | - CMD_AT_TIME_OF_DAY, //Set the time of day |
108 | | - CMD_ATI89, //Display the date and time |
109 | | - |
110 | | - //Select the solenoids for each of the zone |
111 | | - CMD_SELECT_ZONE, //Select the zone number |
112 | | - CMD_SELECT_SOLENOID, //Select the solenoid for the zone |
113 | | - COMPLETE_ZONE_CONFIGURATION,//Verify that all of the zones are configured |
114 | | - |
115 | | - //Set the start times |
116 | | - CMD_SET_DAY_OF_WEEK, //Set the day of the week |
117 | | - CMD_SET_START_TIME, //Set the start time |
118 | | - CMD_SET_ALL_START_TIMES, //Verify that all of the start times are set |
119 | | - |
120 | | - //Set the zone durations |
121 | | - CMD_SET_DAY_OF_WEEK_2, //Set the day of the week |
122 | | - CMD_SELECT_ZONE_2, //Select the zone number |
123 | | - CMD_SET_ZONE_DURATION, //Set the zone on duration |
124 | | - CMD_SET_ALL_DURATIONS, //Verify that all of the durations are set |
125 | | - |
126 | | -/* |
127 | | -#define SET_MANUAL_ON "AT-ZoneManualOn=" |
128 | | -#define SET_ZONE_DURATION "AT-ZoneDuration=" |
129 | | -*/ |
130 | 106 |
|
131 | 107 | //Last in the list |
132 | 108 | CMD_LIST_SIZE |
133 | 109 | } COMMANDS; |
134 | 110 |
|
135 | 111 | const char * const commandName[] = |
136 | 112 | { |
137 | | - "ATI11", "ATIB", "ATA", "AT-CMDVC", "ATC", "WAIT_CONNECT", "AT-CMDVC_2", "ATI12", |
138 | | - "ATI93", "ATI81", "ATI", "ATI8", "AT-EnableController=0", |
139 | | - "AT-DayOfWeek", "AT-TimeOfDay", "ATI89", |
140 | | - "AT-CommandZone", "AT-LatchingSolenoid", "COMPLETE_ZONE_CONFIGURATION", |
141 | | - "AT-CommandDay", "AT-StartTime", "CMD_SET_ALL_START_TIMES", |
142 | | - "AT-CommandDay-2", "AT-CommandZone-2", "AT-ZoneDuration", "CMD_SET_ALL_DURATIONS", |
| 113 | + "ATI11", "ATIB", "ATA", "AT-CMDVC", "ATC", |
| 114 | + "WAIT_CONNECT", |
| 115 | + "AT-CMDVC_2", "ATI12", "ATI", "ATI8", |
143 | 116 | }; |
144 | 117 |
|
145 | | - |
146 | 118 | typedef struct _VIRTUAL_CIRCUIT |
147 | 119 | { |
148 | 120 | int vcState; |
@@ -470,7 +442,6 @@ int hostToStdout(VC_SERIAL_MESSAGE_HEADER * header, uint8_t * data, uint8_t byte |
470 | 442 |
|
471 | 443 | void radioToPcLinkStatus(VC_SERIAL_MESSAGE_HEADER * header, uint8_t * data, uint8_t length) |
472 | 444 | { |
473 | | - int durationBase; |
474 | 445 | int newState; |
475 | 446 | int previousState; |
476 | 447 | int srcVc; |
|
0 commit comments