Skip to content

Commit

Permalink
fix compile error and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lumapu committed Nov 20, 2023
1 parent 8fb7bf1 commit ba8d1f3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/hm/Communication.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ class Communication : public CommQueue<> {
if(q->iv->miMultiParts < 6) {
nextState = States::WAIT;
} else {
if((q->cmd == 0x39) && (q->iv->type == INV_TYPE_4CH) ||
(q->cmd == MI_REQ_CH2) && (q->iv->type == INV_TYPE_2CH) ||
(q->cmd == MI_REQ_CH1) && (q->iv->type == INV_TYPE_1CH)) {
if(((q->cmd == 0x39) && (q->iv->type == INV_TYPE_4CH))
|| ((q->cmd == MI_REQ_CH2) && (q->iv->type == INV_TYPE_2CH))
|| ((q->cmd == MI_REQ_CH1) && (q->iv->type == INV_TYPE_1CH))) {
miComplete(q->iv);
//closeRequest(q->iv, q->iv->miMultiParts > 5);
}
Expand Down
2 changes: 1 addition & 1 deletion src/web/RestApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ class RestApi {
obj[F("en")] = (bool) mConfig->nrf.enabled;
obj[F("isconnected")] = mRadioNrf->isChipConnected();
obj[F("dataRate")] = mRadioNrf->getDataRate();
obj[F("sn")] = String(mRadioCmt->getDTUSn(), HEX);
obj[F("sn")] = String(mRadioNrf->getDTUSn(), HEX);
}

void getSerial(JsonObject obj) {
Expand Down
7 changes: 7 additions & 0 deletions src/web/html/serial.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<div class="col-6 col-sm-4 a-r">
<input type="button" value="clear" class="btn" id="clear"/>
<input type="button" value="autoscroll" class="btn" id="scroll"/>
<!--<input type="button" value="copy" class="btn" id="copy"/>-->
</div>
</div>
</div>
Expand Down Expand Up @@ -63,6 +64,12 @@
mAutoScroll = !mAutoScroll;
this.value = (mAutoScroll) ? "autoscroll" : "manual scroll";
});
/*document.getElementById("copy").addEventListener("click", function() {
con.select();
con.setSelectionRange(0, 9999999);
navigator.clipboard.writeText(con.value);
alert("Copied to clipboard");
});*/

if (!!window.EventSource) {
var source = new EventSource('/events');
Expand Down

0 comments on commit ba8d1f3

Please sign in to comment.