mirror of https://github.com/sfeakes/AqualinkD.git
Update for simulators
parent
61a09820b6
commit
69f9a5c176
18
aqualinkd.c
18
aqualinkd.c
|
@ -1443,9 +1443,11 @@ void caculate_ack_packet(int rs_fd, unsigned char *packet_buffer, emulation_type
|
|||
} else if (_aqualink_data.simulator_active == ONETOUCH) {
|
||||
send_extended_ack(rs_fd, ACK_ONETOUCH, pop_simulator_cmd(packet_buffer[PKT_CMD]));
|
||||
} else if (_aqualink_data.simulator_active == IAQTOUCH) {
|
||||
|
||||
LOG(SIM_LOG,LOG_WARNING, "IAQTOUCH not implimented yet!\n");
|
||||
} else if (_aqualink_data.simulator_active == AQUAPDA) {
|
||||
send_extended_ack(rs_fd, ACK_PDA, pop_simulator_cmd(packet_buffer[PKT_CMD]));
|
||||
} else {
|
||||
// SHOW SOME ERROR
|
||||
LOG(SIM_LOG,LOG_ERR, "No idea on this protocol (%d), not implimented!!!\n",_aqualink_data.simulator_active);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1846,11 +1848,19 @@ void main_loop()
|
|||
caculate_ack_packet(rs_fd, packet_buffer, SIMULATOR);
|
||||
DEBUG_TIMER_STOP(_rs_packet_timer,AQUA_LOG,"Simulator Emulation Processed packet in");
|
||||
}
|
||||
else if ( _aqualink_data.simulator_id == NUL && packet_buffer[PKT_CMD] == CMD_PROBE ) {
|
||||
else if ( _aqualink_data.simulator_id == NUL
|
||||
&& packet_buffer[PKT_CMD] == CMD_PROBE
|
||||
&& packet_buffer[PKT_DEST] != _aqconfig_.device_id
|
||||
#if defined AQ_ONETOUCH || defined AQ_IAQTOUCH
|
||||
&& packet_buffer[PKT_DEST] != _aqconfig_.extended_device_id
|
||||
#endif
|
||||
) {
|
||||
// Check it's a probe we are after
|
||||
//if (_aqualink_data.simulator_active == ONETOUCH && packet_buffer[PKT_DEST] >= 0x40 && packet_buffer[PKT_DEST] <= 0x43 && packet_buffer[PKT_DEST] != _aqconfig_.extended_device_id) {
|
||||
if ( (_aqualink_data.simulator_active == ONETOUCH && packet_buffer[PKT_DEST] >= 0x40 && packet_buffer[PKT_DEST] <= 0x43) ||
|
||||
(_aqualink_data.simulator_active == ALLBUTTON && packet_buffer[PKT_DEST] >= 0x08 && packet_buffer[PKT_DEST] <= 0x0a)
|
||||
(_aqualink_data.simulator_active == ALLBUTTON && packet_buffer[PKT_DEST] >= 0x08 && packet_buffer[PKT_DEST] <= 0x0a) ||
|
||||
(_aqualink_data.simulator_active == IAQTOUCH && packet_buffer[PKT_DEST] >= 0x30 && packet_buffer[PKT_DEST] <= 0x33) ||
|
||||
(_aqualink_data.simulator_active == AQUAPDA && packet_buffer[PKT_DEST] >= 0x60 && packet_buffer[PKT_DEST] <= 0x63)
|
||||
) {
|
||||
_aqualink_data.simulator_id = packet_buffer[PKT_DEST];
|
||||
// reply to probe
|
||||
|
|
|
@ -713,7 +713,36 @@ int build_aux_labels_JSON(struct aqualinkdata *aqdata, char* buffer, int size)
|
|||
|
||||
//return strlen(buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
const char* emulationtype2name(emulation_type type) {
|
||||
switch (type) {
|
||||
case ALLBUTTON:
|
||||
return "allbutton";
|
||||
break;
|
||||
case RSSADAPTER:
|
||||
return "allbutton";
|
||||
break;
|
||||
case ONETOUCH:
|
||||
return "onetouch";
|
||||
break;
|
||||
case IAQTOUCH:
|
||||
return "iaqualinktouch";
|
||||
break;
|
||||
case AQUAPDA:
|
||||
return "aquapda";
|
||||
break;
|
||||
case JANDY_DEVICE:
|
||||
return "jandydevice";
|
||||
break;
|
||||
case SIMULATOR:
|
||||
return "allbutton";
|
||||
break;
|
||||
default:
|
||||
return "none";
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
int build_aqualink_simulator_packet_JSON(struct aqualinkdata *aqdata, char* buffer, int size)
|
||||
{
|
||||
memset(&buffer[0], 0, size);
|
||||
|
@ -722,6 +751,20 @@ int build_aqualink_simulator_packet_JSON(struct aqualinkdata *aqdata, char* buff
|
|||
|
||||
length += sprintf(buffer+length, "{\"type\": \"simpacket\"");
|
||||
|
||||
if (aqdata->simulator_packet[PKT_DEST] >= 0x40 && aqdata->simulator_packet[PKT_DEST] <= 0x43) {
|
||||
length += sprintf(buffer+length, ",\"simtype\": \"onetouch\"");
|
||||
} else if (aqdata->simulator_packet[PKT_DEST] >= 0x08 && aqdata->simulator_packet[PKT_DEST] <= 0x0a) {
|
||||
length += sprintf(buffer+length, ",\"simtype\": \"allbutton\"");
|
||||
} else if (aqdata->simulator_packet[PKT_DEST] >= 0x30 && aqdata->simulator_packet[PKT_DEST] <= 0x33) {
|
||||
length += sprintf(buffer+length, ",\"simtype\": \"iaqtouch\"");
|
||||
} else if (aqdata->simulator_packet[PKT_DEST] >= 0x60 && aqdata->simulator_packet[PKT_DEST] <= 0x63) {
|
||||
length += sprintf(buffer+length, ",\"simtype\": \"aquapda\"");
|
||||
} else {
|
||||
length += sprintf(buffer+length, ",\"simtype\": \"unknown\"");
|
||||
}
|
||||
//if (aqdata->simulator_packet[i][])
|
||||
//length += sprintf(buffer+length, ",\"simtype\": \"onetouch\"");
|
||||
|
||||
length += sprintf(buffer+length, ",\"raw\": [");
|
||||
for (i=0; i < aqdata->simulator_packet_length; i++)
|
||||
{
|
||||
|
|
|
@ -993,6 +993,14 @@ uriAtype action_URI(request_source from, const char *URI, int uri_length, float
|
|||
LOG(NET_LOG,LOG_NOTICE, "Received request to start AllButton Simulator!\n");
|
||||
_aqualink_data->simulator_active = ALLBUTTON;
|
||||
return uSimulator;
|
||||
} else if (strncmp(ri1, "simulator/aquapda", 17) == 0 && from == NET_WS) { // Only valid from websocket.
|
||||
LOG(NET_LOG,LOG_NOTICE, "Received request to start PDA Simulator!\n");
|
||||
_aqualink_data->simulator_active = AQUAPDA;
|
||||
return uSimulator;
|
||||
} else if (strncmp(ri1, "simulator/iaqtouch", 18) == 0 && from == NET_WS) { // Only valid from websocket.
|
||||
LOG(NET_LOG,LOG_NOTICE, "Received request to start iAqualinkTouch Simulator!\n");
|
||||
_aqualink_data->simulator_active = IAQTOUCH;
|
||||
return uSimulator;
|
||||
/*
|
||||
} else if (strncmp(ri1, "simulator", 9) == 0 && from == NET_WS) { // Only valid from websocket.
|
||||
return uSimulator;*/
|
||||
|
@ -1607,7 +1615,7 @@ void action_websocket_request(struct mg_connection *nc, struct websocket_message
|
|||
//_aqualink_data->simulate_panel = true;
|
||||
// Clear simulator ID incase sim type changes
|
||||
_aqualink_data->simulator_id = NUL;
|
||||
LOG(NET_LOG,LOG_ERR, "Started Simulator Mode, code removed for dubug, put back in\n");
|
||||
//LOG(NET_LOG,LOG_ERR, "Started Simulator Mode, code removed for dubug, put back in\n");
|
||||
|
||||
DEBUG_TIMER_START(&tid);
|
||||
char message[JSON_BUFFER_SIZE];
|
||||
|
|
Binary file not shown.
|
@ -35,12 +35,35 @@
|
|||
table {
|
||||
background-color: rgb(221, 221, 221);
|
||||
padding: 10px;
|
||||
/* border-collapse: collapse;*/
|
||||
}
|
||||
|
||||
th {
|
||||
th {
|
||||
font-weight: normal;
|
||||
background-color: white;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.td_led {
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
padding-left: 4px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
.td_button {
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
padding-left: 0px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
|
||||
#title {
|
||||
background-color: rgb(200, 200, 200);
|
||||
font-weight: 600;
|
||||
|
@ -49,6 +72,7 @@
|
|||
input[type=button],
|
||||
input[type=submit],
|
||||
input[type=reset] {
|
||||
/*font-family: monospace;*/
|
||||
background-color: rgb(165, 165, 165);
|
||||
border: none;
|
||||
color: rgb(0, 0, 0);
|
||||
|
@ -70,6 +94,19 @@
|
|||
opacity: 1.0;
|
||||
}
|
||||
|
||||
.lcd_display {
|
||||
/* font-family: monospace;*/
|
||||
background-color: #2b2b2b;
|
||||
color: white;
|
||||
white-space: pre;
|
||||
}
|
||||
.lcd_history {
|
||||
/* font-family: monospace;*/
|
||||
background-color: #aeaeae;
|
||||
color: white;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.on {
|
||||
background-color: rgb(255, 0, 0);
|
||||
}
|
||||
|
@ -86,6 +123,11 @@
|
|||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.version {
|
||||
/*font-family: monospace;*/
|
||||
font-size: x-small;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
|
@ -258,19 +300,7 @@
|
|||
document.getElementById("messages").innerHTML = ' !!! PDA Not Supported !!! '
|
||||
document.getElementById("messages").classList.add("error");
|
||||
}
|
||||
/*
|
||||
if (document.getElementById("status").getAttribute("raw") != data.panel_message) {
|
||||
document.getElementById("status_three").innerHTML = document.getElementById("status_two").innerHTML;
|
||||
document.getElementById("status_two").innerHTML = document.getElementById("status").innerHTML;
|
||||
if (data.panel_message == "") {
|
||||
document.getElementById("status").innerHTML = " ";
|
||||
} else {
|
||||
document.getElementById("status").innerHTML = data.panel_message;
|
||||
}
|
||||
document.getElementById("status").setAttribute("raw", data.panel_message);
|
||||
document.getElementById("messages").innerHTML = " ";
|
||||
}
|
||||
*/
|
||||
|
||||
for (var obj in data.leds) {
|
||||
if ((led = document.getElementById(obj.toString() + "_led")) == null) {
|
||||
//console.log("Error " + obj.toString() + " LED not found");
|
||||
|
@ -297,6 +327,11 @@
|
|||
}
|
||||
|
||||
set_panel_size(_panel_size);
|
||||
|
||||
const versionlabel = document.getElementById("version");
|
||||
if (versionlabel.innerHTML = " ") {
|
||||
versionlabel.innerHTML = "AqualinkD "+data.aqualinkd_version+"<br>"+data.panel_type+" "+data.version;
|
||||
}
|
||||
}
|
||||
|
||||
function update_device(data) {
|
||||
|
@ -313,6 +348,22 @@
|
|||
}
|
||||
}
|
||||
|
||||
function update_status_message(message=null, error=false) {
|
||||
const status = document.getElementById("status");
|
||||
|
||||
if (message != null) {
|
||||
status.innerHTML = message;
|
||||
} else {
|
||||
status.innerHTML = "AqualinkD All Button Simulator";
|
||||
}
|
||||
|
||||
if (error) {
|
||||
status.classList.add("error");
|
||||
} else {
|
||||
status.classList.remove("error");
|
||||
}
|
||||
}
|
||||
|
||||
function packet_to_ascii(packet) {
|
||||
var msg="";
|
||||
|
||||
|
@ -334,9 +385,9 @@
|
|||
|
||||
function lcd_display(line, message) {
|
||||
|
||||
const message_lcd = document.getElementById("status");
|
||||
const message_lcd1 = document.getElementById("status_two");
|
||||
const message_lcd2 = document.getElementById("status_three");
|
||||
const message_lcd = document.getElementById("lcd");
|
||||
const message_lcd1 = document.getElementById("lcd_2");
|
||||
const message_lcd2 = document.getElementById("lcd_3");
|
||||
|
||||
if (message == "" || message == " "){message = " ";}
|
||||
|
||||
|
@ -346,7 +397,7 @@
|
|||
}
|
||||
|
||||
function lcd_display_append(line, message) {
|
||||
const message_lcd = document.getElementById("status");
|
||||
const message_lcd = document.getElementById("lcd");
|
||||
message_lcd.innerHTML = message_lcd.innerHTML+message;
|
||||
}
|
||||
|
||||
|
@ -359,6 +410,11 @@
|
|||
const CMD_MSG_LOOP_ST = 8 // pda highlight
|
||||
|
||||
function process_packet(data) {
|
||||
if (data.simtype != "allbutton") {
|
||||
update_status_message("Wrong message - is Another simulator running?", true);
|
||||
return;
|
||||
}
|
||||
|
||||
switch(data.dec[PKT_CMD]) {
|
||||
case CMD_MSG: // Message
|
||||
console.log("Received Line "+data.dec[PKT_DATA1]+" = "+packet_to_ascii(data.dec));
|
||||
|
@ -411,7 +467,8 @@
|
|||
get_devices();
|
||||
}
|
||||
socket_di.onmessage = function got_packet(msg) {
|
||||
document.getElementById("status").classList.remove("error");
|
||||
//document.getElementById("status").classList.remove("error");
|
||||
update_status_message();
|
||||
var data = JSON.parse(msg.data);
|
||||
if (data.type == 'simpacket') {
|
||||
process_packet(data);
|
||||
|
@ -426,8 +483,9 @@
|
|||
}
|
||||
socket_di.onclose = function () {
|
||||
// something went wrong
|
||||
document.getElementById("status").innerHTML = ' !!! Connection error !!! '
|
||||
document.getElementById("status").classList.add("error");
|
||||
//document.getElementById("status").innerHTML = ' !!! Connection error !!! '
|
||||
//document.getElementById("status").classList.add("error");
|
||||
update_status_message(' !!! Connection error !!! ', true);
|
||||
// Try to reconnect every 5 seconds.
|
||||
setTimeout(function () {
|
||||
startWebsockets();
|
||||
|
@ -443,6 +501,7 @@
|
|||
//command: "simulator"
|
||||
uri: "simulator/allbutton"
|
||||
};
|
||||
document.getElementById("lcd").innerHTML = "Connecting to panel, please wait!"
|
||||
socket_di.send(JSON.stringify(msg));
|
||||
}
|
||||
|
||||
|
@ -474,167 +533,166 @@
|
|||
|
||||
<table border='0' id="deviceList">
|
||||
<tr style="title">
|
||||
<td style="title" colspan="12" align="center"><label id="title"> AqualinkD All Button Simulator </label></th>
|
||||
<td style="title" colspan="12" align="center"><label id="status"> AqualinkD All Button Simulator </label></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="12" align="center"><label id="status_three"> </label></td>
|
||||
<th colspan="12" align="center" class="lcd_history"><label id="lcd_3"> </label></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="12" align="center"><label id="status_two"> </label></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th colspan="12"><label id="status">AqualinkD</label></th>
|
||||
<th colspan="12" align="center" class="lcd_history"><label id="lcd_2"> </label></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<th colspan="12" class="lcd_display"><label id="lcd"> </label></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="td_led">
|
||||
<div id="Filter_Pump_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Filter_Pump_button" type="button" onclick="send(this);" value="Filter Pump">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Spa_Mode_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Spa_Mode_button" type="button" onclick="send(this);" value="Spa Mode">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Aux_1_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_1_button" type="button" onclick="send(this);" value="AUX1">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Aux_2_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_2_button" type="button" onclick="send(this);" value="AUX2">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Aux_3_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_3_button" type="button" onclick="send(this);" value="AUX3">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Aux_4_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_4_button" type="button" onclick="send(this);" value="AUX4">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Aux_5_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_5_button" type="button" onclick="send(this);" value="AUX5">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Aux_6_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_6_button" type="button" onclick="send(this);" value="AUX6">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Aux_7_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_7_button" type="button" onclick="send(this);" value="AUX7">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Aux_B1_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_B1_button" type="button" onclick="send(this);" value="AUXB1">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Aux_B2_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_B2_button" type="button" onclick="send(this);" value="AUXB2">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Aux_B3_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_B3_button" type="button" onclick="send(this);" value="AUXB3">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Aux_B4_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_B4_button" type="button" onclick="send(this);" value="AUXB4">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_B5_button" type="button" onclick="send(this);" value="AUXB5">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_B6_button" type="button" onclick="send(this);" value="AUXB6">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_B7_button" type="button" onclick="send(this);" value="AUXB7">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Aux_B8_button" type="button" onclick="send(this);" value="AUXB8">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Pool_Heater_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Pool_Heater_button" type="button" onclick="send(this);" value="Pool Heater">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Spa_Heater_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Spa_Heater_button" type="button" onclick="send(this);" value="Spa Heater">
|
||||
</td>
|
||||
<td align="right">
|
||||
<td class="td_led">
|
||||
<div id="Solar_Heater_led" class="led off"></div>
|
||||
</td>
|
||||
<td align="left">
|
||||
<td class="td_button">
|
||||
<input id="Solar_Heater_button" type="button" onclick="send(this);" value="Solar Heater">
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -658,9 +716,14 @@
|
|||
<input type="button" onclick="send(this);" id="B_enter" value="Enter *">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="12" align="center"><label id="messages"> </label></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="12" id="version" class="version"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
@ -0,0 +1,624 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
|
||||
<head>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=windows-1252'>
|
||||
<title>AqualinkD Simulator</title>
|
||||
<meta name='viewport' content='width=device-width'>
|
||||
<meta name='apple-mobile-web-app-capable' content='yes'>
|
||||
<meta name='apple-mobile-web-app-status-bar-style' content='black'>
|
||||
<meta name='apple-mobile-web-app-status-bar-style' content='black'>
|
||||
<link href="aqualinkd.png" rel="apple-touch-icon">
|
||||
<link href="aqualinkd.png" rel="icon">
|
||||
<style>
|
||||
html {}
|
||||
|
||||
body {
|
||||
font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;
|
||||
font-weight: 300;
|
||||
background-color: white;
|
||||
color: #000000;
|
||||
margin: 0 !important;
|
||||
padding: 0 !important;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
/*position: absolute;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;*/
|
||||
}
|
||||
|
||||
table {
|
||||
background-color: rgb(221, 221, 221);
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
th {
|
||||
/*
|
||||
background-color: white;
|
||||
border-spacing: 10px;*/
|
||||
padding-top: 0px;
|
||||
padding-bottom: 0px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
td {
|
||||
/*
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
*/
|
||||
/*padding: 10px;*/
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
#title {
|
||||
background-color: rgb(200, 200, 200);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
input[type=button],
|
||||
input[type=submit],
|
||||
input[type=reset] {
|
||||
background-color: rgb(165, 165, 165);
|
||||
border: none;
|
||||
color: rgb(0, 0, 0);
|
||||
padding: 2px 2px;
|
||||
text-decoration: none;
|
||||
margin: 0px 0px;
|
||||
min-width: 70px;
|
||||
border-radius: 70px;
|
||||
}
|
||||
|
||||
.button_s {
|
||||
min-width: 40px !important;
|
||||
border-radius: 40px !important;
|
||||
}
|
||||
|
||||
.led {
|
||||
border-radius: calc(var(--tile_icon-height) / 2);
|
||||
border-radius: 20px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
filter: alpha(opacity=100);
|
||||
opacity: 1.0;
|
||||
}
|
||||
|
||||
.on {
|
||||
background-color: rgb(255, 0, 0);
|
||||
}
|
||||
|
||||
.off {
|
||||
background-color: rgb(116, 116, 116);
|
||||
}
|
||||
|
||||
.error {
|
||||
background-color: rgb(255, 0, 0) !important;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.lcd_display {
|
||||
font-family: monospace;
|
||||
background-color: #2b2b2b;
|
||||
color: white;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.lcd_highlight {
|
||||
font-family: monospace;
|
||||
background-color: #8e1e1e !important;
|
||||
color: white !important;
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.version {
|
||||
/*font-family: monospace;*/
|
||||
font-size: x-small;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type='text/javascript'>
|
||||
|
||||
var _socket_di;
|
||||
|
||||
const PKT_CMD = 3;
|
||||
const PKT_DATA1 = 4;
|
||||
const PKT_DATA2 = 5;
|
||||
const PKT_DATA3 = 6;
|
||||
|
||||
const CMD_MSG_LONG = 4;
|
||||
const CMD_PDA_CLEAR = 9;
|
||||
const CMD_PDA_HIGHLIGHT = 8;
|
||||
const CMD_PDA_HIGHLIGHTCHARS = 16;
|
||||
const CMD_PDA_SHIFTLINES = 15;
|
||||
|
||||
const PDA_LINES = 9; // 0 to 9
|
||||
|
||||
var _hlightcharlineno = -1;
|
||||
var _hlightcharline = "";
|
||||
var _hlightcharstart = -1;
|
||||
var _hlightcharend = -1;
|
||||
|
||||
|
||||
function send(source) {
|
||||
console.log("from" + source.id);
|
||||
|
||||
var cmd = {};
|
||||
cmd.uri = "simcmd"
|
||||
switch (source.id) {
|
||||
case "Up":
|
||||
cmd.value = "0x06";
|
||||
break;
|
||||
case "Down":
|
||||
cmd.value = "0x05";
|
||||
break;
|
||||
case "Select":
|
||||
cmd.value = "0x04";
|
||||
break;
|
||||
case "Page_up":
|
||||
cmd.value = "0x03";
|
||||
break;
|
||||
case "Back":
|
||||
cmd.value = "0x02";
|
||||
break;
|
||||
case "Page_down":
|
||||
cmd.value = "0x01";
|
||||
break;
|
||||
|
||||
default:
|
||||
alert("Unknown button");
|
||||
return;
|
||||
break;
|
||||
}
|
||||
|
||||
cmd.value = todec(cmd.value);
|
||||
send_command(cmd);
|
||||
}
|
||||
|
||||
function tohex(value) {
|
||||
var rtn = parseInt(value).toString(16);
|
||||
if (rtn.length <= 1)
|
||||
return "0x0" + rtn;
|
||||
else
|
||||
return "0x" + rtn;
|
||||
}
|
||||
function todec(value) {
|
||||
let number = parseInt(value, 16);
|
||||
return number;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function lcd_clear() {
|
||||
//var container = document.getElementById("lcd_display");
|
||||
for (i = 0; i <= PDA_LINES; i++) {
|
||||
//container.lastElementChild.remove();
|
||||
//child = container.children[i];
|
||||
//console.log("Line "+i+" replacing "+child.innerHTML)
|
||||
//child.innerHTML = " ";
|
||||
var line = document.getElementById("lcd-l" + i);
|
||||
//console.log("Line "+i+" replacing "+line.innerHTML)
|
||||
line.innerHTML = " ";
|
||||
line.classList.remove("lcd_highlight");
|
||||
line.classList.add("lcd_display");
|
||||
}
|
||||
|
||||
lcd_clear_highlight_chrs(false);
|
||||
}
|
||||
|
||||
function lcd_display(lineno, message) {
|
||||
// We get lines 0,2,3,4,5,6.... no line 1. (so using 0 as 1)
|
||||
if (lineno == 0) { lineno = 1; }
|
||||
// Line 64 is time,
|
||||
if (lineno == 64) { lineno = 0; }
|
||||
// line 130 is pool air temp
|
||||
if (lineno == 130) { lineno = 2; }
|
||||
|
||||
|
||||
var line = document.getElementById("lcd-l" + lineno);
|
||||
//console.log("Line "+lineno+" replacing '"+line.innerHTML+"' with '"+message+"'");
|
||||
line.innerHTML = message;
|
||||
|
||||
// See if we need to re-highlight any chrs
|
||||
check_rehighlight_chrs(lineno);
|
||||
}
|
||||
|
||||
function lcd_display_shiftlines(first, last, shift) {
|
||||
|
||||
if (shift < 0) {
|
||||
for (i = first-shift; i <= line; i++) {
|
||||
var line1 = document.getElementById("lcd-l" + (i + shift) );
|
||||
var line2 = document.getElementById("lcd-l" + last);
|
||||
line1.innerHTML = line2.innerHTML;
|
||||
}
|
||||
} else {
|
||||
for (i = last; i >= first+shift; i--) {
|
||||
var line1 = document.getElementById("lcd-l" + i);
|
||||
var line2 = document.getElementById("lcd-l" + (i - shift) );
|
||||
line1.innerHTML = line2.innerHTML;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function lcd_display_highlight(lineno) {
|
||||
// We get lines 0,2,3,4,5,6.... no line 1. (so using 0 as 1)
|
||||
if (lineno == 0) { lineno = 1; }
|
||||
|
||||
for (i = 0; i <= PDA_LINES; i++) {
|
||||
var line = document.getElementById("lcd-l" + i);
|
||||
if (i != lineno) {
|
||||
line.classList.remove("lcd_highlight");
|
||||
line.classList.add("lcd_display");
|
||||
//console.log("remove highlight to line #"+i+" "+line.innerHTML)
|
||||
} else {
|
||||
line.classList.add("lcd_highlight");
|
||||
line.classList.remove("lcd_display");
|
||||
//console.log("add highlight to line #"+i+" "+line.innerHTML)
|
||||
}
|
||||
}
|
||||
//line.classList.add("lcd_highlight");
|
||||
//line.classList.remove("lcd_display");
|
||||
}
|
||||
|
||||
|
||||
|
||||
function check_rehighlight_chrs(lineno) {
|
||||
if (_hlightcharlineno == lineno && _hlightcharstart >= 0 && _hlightcharend > 0) {
|
||||
// We would have received a new line text, so don't preserve old text
|
||||
lcd_display_highlight_chrs(_hlightcharlineno, _hlightcharstart, _hlightcharend, false);
|
||||
}
|
||||
}
|
||||
|
||||
function lcd_clear_highlight_chrs(preserve = true) {
|
||||
|
||||
// if preserve, then we put back the old text.
|
||||
if (preserve && _hlightcharlineno >= 0 && _hlightcharline != "") {
|
||||
var line = document.getElementById("lcd-l" + _hlightcharlineno);
|
||||
line.innerHTML = _hlightcharline;
|
||||
}
|
||||
|
||||
_hlightcharlineno = -1;
|
||||
_hlightcharline = "";
|
||||
_hlightcharstart = -1;
|
||||
_hlightcharend = -1;
|
||||
}
|
||||
|
||||
function lcd_display_highlight_chrs(lineno, start, end, preserve = true) {
|
||||
|
||||
lcd_clear_highlight_chrs(preserve);
|
||||
|
||||
var line = document.getElementById("lcd-l" + lineno);
|
||||
text = line.innerHTML;
|
||||
|
||||
var newtxt = text.slice(0, end + 1) + "</span>" + text.slice(end + 1);
|
||||
var newtxt = newtxt.slice(0, start) + "<span class=\"lcd_highlight\">" + newtxt.slice(start);
|
||||
line.innerHTML = newtxt;
|
||||
|
||||
_hlightcharlineno = lineno;
|
||||
_hlightcharline = text;
|
||||
_hlightcharstart = start;
|
||||
_hlightcharend = end;
|
||||
|
||||
console.log("Line '" + text + "' now '" + newtxt + "'");
|
||||
}
|
||||
|
||||
function packet_to_ascii(packet) {
|
||||
var msg = "";
|
||||
|
||||
for (i = 5; i <= 20; i++) {
|
||||
if (packet[i] >= 31 && packet[i] <= 127) {
|
||||
msg = msg + String.fromCharCode(packet[i]);
|
||||
} else if (packet[i] == 223) {
|
||||
msg = msg + "°";
|
||||
} else if (packet[i] == 0) {
|
||||
break; // End on a nul
|
||||
} else {
|
||||
console.log("Bad char in string '" + msg + "' next (" + packet[i] + ")");
|
||||
}
|
||||
}
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function process_packet(data) {
|
||||
|
||||
if (data.simtype != "aquapda") {
|
||||
update_status_message("Another simulator running", true);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (data.dec[PKT_CMD]) {
|
||||
case CMD_PDA_CLEAR: // Clear
|
||||
console.log("Received Clear");
|
||||
lcd_clear();
|
||||
_shift_lines = false;
|
||||
break;
|
||||
case CMD_MSG_LONG: // Message
|
||||
console.log("Received Line " + data.dec[PKT_DATA1] + " = " + packet_to_ascii(data.dec));
|
||||
lcd_display(data.dec[PKT_DATA1], packet_to_ascii(data.dec));
|
||||
break;
|
||||
case CMD_PDA_HIGHLIGHT:
|
||||
console.log("Received Highlight " + data.dec[PKT_DATA1]);
|
||||
// We sometimes get 255 for line number, need to find out why
|
||||
lcd_display_highlight(data.dec[PKT_DATA1]);
|
||||
break;
|
||||
case CMD_PDA_HIGHLIGHTCHARS:
|
||||
console.log("Received Highlight chars, Line=" + data.dec[PKT_DATA1] + ", Start=" + data.dec[PKT_DATA2] + ", Stop=" + data.dec[PKT_DATA3]);
|
||||
lcd_display_highlight_chrs(data.dec[PKT_DATA1], data.dec[PKT_DATA2], data.dec[PKT_DATA3]);
|
||||
break;
|
||||
case CMD_PDA_SHIFTLINES:
|
||||
lcd_display_shiftlines(data.dec[PKT_DATA1], data.dec[PKT_DATA2], data.dec[PKT_DATA3]);
|
||||
break;
|
||||
default:
|
||||
// 2 is READY for commands
|
||||
console.log("Received unknown command " + data.dec[PKT_CMD] + " " + tohex(data.dec[PKT_CMD]));
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function update_status_message(message = null, error = false) {
|
||||
const status = document.getElementById("status");
|
||||
|
||||
if (message != null) {
|
||||
status.innerHTML = message;
|
||||
} else {
|
||||
status.innerHTML = "AqualinkD PDA Simulator";
|
||||
}
|
||||
|
||||
if (error) {
|
||||
status.classList.add("error");
|
||||
} else {
|
||||
status.classList.remove("error");
|
||||
}
|
||||
}
|
||||
|
||||
function update_status(data) {
|
||||
// Some form of error if PDA only panel.
|
||||
if (data.panel_type.startsWith("PDA")) {
|
||||
//document.getElementById("status").innerHTML = ' !!! PDA only panels are not Supported !!! '
|
||||
//document.getElementById("status").classList.add("error");
|
||||
update_status_message("PDA only panels are not Supported", true);
|
||||
}
|
||||
|
||||
const versionlabel = document.getElementById("version");
|
||||
if (versionlabel.innerHTML = " ") {
|
||||
versionlabel.innerHTML = "AqualinkD " + data.aqualinkd_version + "<br>" + data.panel_type + " " + data.version;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function get_appropriate_ws_url() {
|
||||
var pcol;
|
||||
var u = document.URL;
|
||||
/*
|
||||
* We open the websocket encrypted if this page came on an
|
||||
* https:// url itself, otherwise unencrypted
|
||||
*/
|
||||
if (u.substring(0, 5) == "https") {
|
||||
pcol = "wss://";
|
||||
u = u.substr(8);
|
||||
} else {
|
||||
pcol = "ws://";
|
||||
if (u.substring(0, 4) == "http")
|
||||
u = u.substr(7);
|
||||
}
|
||||
u = u.split('/');
|
||||
//alert (pcol + u[0] + ":6500");
|
||||
return pcol + u[0];
|
||||
}
|
||||
/* dumb increment protocol */
|
||||
|
||||
|
||||
function startWebsockets() {
|
||||
_socket_di = new WebSocket(get_appropriate_ws_url());
|
||||
try {
|
||||
_socket_di.onopen = function () {
|
||||
// success!
|
||||
start_simulator();
|
||||
//get_devices();
|
||||
}
|
||||
_socket_di.onmessage = function got_packet(msg) {
|
||||
update_status_message();
|
||||
var data = JSON.parse(msg.data);
|
||||
if (data.type == 'simpacket') {
|
||||
process_packet(data);
|
||||
} else if (data.type == 'status') {
|
||||
update_status(data);
|
||||
}
|
||||
}
|
||||
_socket_di.onclose = function () {
|
||||
// something went wrong
|
||||
//document.getElementById("status").innerHTML = ' !!! Connection error !!! '
|
||||
//document.getElementById("status").classList.add("error");
|
||||
update_status_message("!!! Connection error !!!", true);
|
||||
// Try to reconnect every 5 seconds.
|
||||
setTimeout(function () {
|
||||
startWebsockets();
|
||||
}, 5000);
|
||||
}
|
||||
} catch (exception) {
|
||||
alert('<p>Error' + exception);
|
||||
}
|
||||
}
|
||||
|
||||
function start_simulator() {
|
||||
var msg = {
|
||||
//command: "simulator"
|
||||
uri: "simulator/aquapda"
|
||||
};
|
||||
lcd_clear();
|
||||
document.getElementById("lcd-l2").innerHTML = " Connecting ";
|
||||
document.getElementById("lcd-l3").innerHTML = " Please wait! ";
|
||||
|
||||
_socket_di.send(JSON.stringify(msg));
|
||||
}
|
||||
|
||||
function get_devices() {
|
||||
var msg = {
|
||||
uri: "devices"
|
||||
};
|
||||
_socket_di.send(JSON.stringify(msg));
|
||||
}
|
||||
|
||||
function send_command(cmd) {
|
||||
_socket_di.send(JSON.stringify(cmd));
|
||||
}
|
||||
/*
|
||||
function reset() {
|
||||
_socket_di.send("reset\n");
|
||||
}
|
||||
*/
|
||||
function init() {
|
||||
update_status_message();
|
||||
startWebsockets();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<body onload="init();">
|
||||
<div class="wrapper">
|
||||
|
||||
<div class="inner">
|
||||
|
||||
<table border='0' id="deviceList">
|
||||
<tr>
|
||||
<th id="status" align="center" colspan="5"> </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" align="center">
|
||||
<table border='0'>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" class="lcd_display" id="lcd-l0">
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" class="lcd_display" id="lcd-l1">
|
||||
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" class="lcd_display" id="lcd-l2"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" class="lcd_display" id="lcd-l3"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" class="lcd_display" id="lcd-l4"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" class="lcd_display" id="lcd-l5"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" class="lcd_display" id="lcd-l6"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" class="lcd_display" id="lcd-l7"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" class="lcd_display" id="lcd-l8"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" class="lcd_display" id="lcd-l9"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<!--
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" class="lcd_display" id="lcd-l10"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" class="lcd_display" id="lcd-l11"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="3" class="lcd_display" id="lcd-l12"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
-->
|
||||
</table>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<td align="center"><input class="button_s" id="Back" type="button" onclick="send(this);"value="↩"></td>
|
||||
<td align="center"><input class="button_s" id="Up" type="button" onclick="send(this);"value="↑"></td>
|
||||
<!--<td align="center"><input class="button_s" id="Power" type="button" onclick="send(this);"value="↻"></td>-->
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td align="center" colspan="3"><input id="Select" type="button" onclick="send(this);"
|
||||
value="Select"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td align="center"><input class="button_s" id="One" type="button" onclick="send(this);" value="1"></td>
|
||||
<td align="center"><input class="button_s" id="Down" type="button" onclick="send(this);"value="↓"></td>
|
||||
<td align="center"><input class="button_s" id="Two" type="button" onclick="send(this);" value="2">
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5" id="version" class="version"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--<div class="inner">END</div>-->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -76,8 +76,8 @@
|
|||
padding: 2px 2px;
|
||||
text-decoration: none;
|
||||
margin: 0px 0px;
|
||||
min-width: 70px;
|
||||
border-radius: 70px;
|
||||
min-width: 60px;
|
||||
border-radius: 60px;
|
||||
}
|
||||
|
||||
.led {
|
||||
|
@ -123,6 +123,11 @@
|
|||
white-space: pre;
|
||||
}
|
||||
|
||||
.version {
|
||||
/*font-family: monospace;*/
|
||||
font-size: x-small;
|
||||
}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
|
@ -309,6 +314,12 @@
|
|||
|
||||
|
||||
function process_packet(data) {
|
||||
|
||||
if (data.simtype != "onetouch") {
|
||||
update_status_message("! Another simulator running !", true);
|
||||
return;
|
||||
}
|
||||
|
||||
switch(data.dec[PKT_CMD]) {
|
||||
case CMD_PDA_CLEAR: // Clear
|
||||
console.log("Received Clear");
|
||||
|
@ -359,6 +370,11 @@
|
|||
//document.getElementById("status").classList.add("error");
|
||||
update_status_message("PDA only panels are not Supported", true);
|
||||
}
|
||||
|
||||
const versionlabel = document.getElementById("version");
|
||||
if (versionlabel.innerHTML = " ") {
|
||||
versionlabel.innerHTML = "AqualinkD "+data.aqualinkd_version+"<br>"+data.panel_type+" "+data.version;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -468,14 +484,14 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input id="Page_up" type="button" onclick="send(this);" value="Page up"></td>
|
||||
<td><input id="Page_up" type="button" onclick="send(this);" value="↑↑"></td>
|
||||
<td class="lcd_display" id="lcd-l2"></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="lcd_display" id="lcd-l3"> </td>
|
||||
<td><input id="Up" type="button" onclick="send(this);" value="Up"></td>
|
||||
<td><input id="Up" type="button" onclick="send(this);" value="↑"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
|
@ -483,7 +499,7 @@
|
|||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input id="Back" type="button" onclick="send(this);" value="Back"></td>
|
||||
<td><input id="Back" type="button" onclick="send(this);" value="↩"></td>
|
||||
<td class="lcd_display" id="lcd-l5"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -495,10 +511,10 @@
|
|||
<tr>
|
||||
<td></td>
|
||||
<td class="lcd_display" id="lcd-l7"> </td>
|
||||
<td><input id="Down" type="button" onclick="send(this);" value="Down"></td>
|
||||
<td><input id="Down" type="button" onclick="send(this);" value="↓"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input id="Page_down" type="button" onclick="send(this);" value="Page Down"></td>
|
||||
<td><input id="Page_down" type="button" onclick="send(this);" value="↓↓"></td>
|
||||
<td class="lcd_display" id="lcd-l8"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
@ -522,12 +538,14 @@
|
|||
<td class="lcd_display" id="lcd-l12"> </td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></td>
|
||||
<th align="center"><input id="Select" type="button" onclick="send(this);" value="Select"></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" id="version" class="version"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--<div class="inner">END</div>-->
|
||||
|
|
Loading…
Reference in New Issue