Improved Go Tool so that the OTA Update Works again

This commit is contained in:
2026-02-08 17:00:41 +01:00
parent c656d4afd7
commit 0bcacb4a53
10 changed files with 362 additions and 35 deletions
+35
View File
@@ -5,6 +5,8 @@ const (
TopicUARTRx = "uart:rx"
TopicUARTTx = "uart:tx"
TopicUARTError = "uart:error"
TopicOTA = "ota"
)
type Frame struct {
@@ -18,6 +20,12 @@ const (
CmdVersion byte = 0x02
CmdClientInfo byte = 0x03
CmdClientInput byte = 0x04
CmdOtaStart byte = 0x10
CmdOtaPayload byte = 0x11
CmdOtaEnd byte = 0x12
CmdOtaStatus byte = 0x13
CmdOtaStartEspNow byte = 0x14
)
const (
@@ -50,3 +58,30 @@ type PayloadClientInput struct {
Y float32
InputMask uint32
}
type PayloadOtaStatus struct {
SequenzCounter uint16
WriteIndex uint16
Data []byte
}
type PayloadOtaStart struct {
Data []byte
Parition byte
Error byte
}
type PayloadOtaEnd struct {
Data []byte
}
type PayloadOtaPayload struct {
SequenzCounter uint16
WriteIndex uint16
Data []byte
Error byte
}
type PayloadOtaStartEspNow struct {
Data []byte
}