OTA Update nearly working but could not get image correctly transefered
This commit is contained in:
+12
-4
@@ -22,10 +22,11 @@ const (
|
||||
UART_CLIENT_INFO = 0x03
|
||||
|
||||
// OTA
|
||||
UART_OTA_START = 0x10
|
||||
UART_OTA_PAYLOAD = 0x11
|
||||
UART_OTA_END = 0x12
|
||||
UART_OTA_STATUS = 0x13
|
||||
UART_OTA_START = 0x10
|
||||
UART_OTA_PAYLOAD = 0x11
|
||||
UART_OTA_END = 0x12
|
||||
UART_OTA_STATUS = 0x13
|
||||
UART_OTA_START_ESPNOW = 0x14
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -501,6 +502,13 @@ func main() {
|
||||
sendMessage(port, send_buffer[:n])
|
||||
break
|
||||
case "6": // end update
|
||||
case "7": // Start OTA for ESP-NOW clients
|
||||
payload_buffer := make([]byte, 1024)
|
||||
send_buffer := make([]byte, 1024)
|
||||
payload_buffer[0] = UART_OTA_START_ESPNOW // Use the new constant
|
||||
n := buildMessage(payload_buffer, 1, send_buffer)
|
||||
sendMessage(port, send_buffer[:n])
|
||||
break
|
||||
default:
|
||||
fmt.Printf("Not a valid input")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user