Revision cc7646f9
Major changes to mainbox code.
-Added local cache for RFID -> tool permissions
-Queries new page /crm/roboauth/%08x, which gives bitmask of all tool
permissions instead of just one
-Added pid file at /var/run/tooltron.pid
-Now must be run as "tooltron run" and also has "tooltron refresh" and
"tooltron clear" which send signals to the pid in the pid file
-Other things I'm forgetting
mainbox/tool.c | ||
---|---|---|
99 | 99 |
} |
100 | 100 |
|
101 | 101 |
void tool_request_disable(struct tool_t *tool) { |
102 |
log_print("Requesting disable on %s (%d)", tool->name, tool->address); |
|
103 |
tool_write_coil(MB_COIL_REQ_DIS, 1); |
|
104 |
tool->state = TS_REQ_DIS; |
|
102 |
if (tool->state == TS_ON) { |
|
103 |
log_print("Requesting disable on %s (%d)", tool->name, tool->address); |
|
104 |
tool_write_coil(MB_COIL_REQ_DIS, 1); |
|
105 |
tool->state = TS_REQ_DIS; |
|
106 |
} |
|
105 | 107 |
} |
106 | 108 |
|
107 | 109 |
void tool_poll(struct tool_t *tool) { |
Also available in: Unified diff