Skip to content

Commit

Permalink
Merge branch 'floitsch/uart.15.validate' into floitsch/uart.20.interface
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch committed Jan 15, 2024
2 parents ab054c2 + 59bed97 commit c1c4e5d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/network.toit
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@ class EndpointHttp implements Endpoint:
address := "http://$network.address:$socket.local-address.port"
logger.info "running Jaguar device '$device.name' (id: '$device.id') on '$address'"

// We've successfully connected to the network, so we consider
// the current firmware functional. Go ahead and validate the
// firmware if requested to do so.
if firmware-is-validation-pending:
if firmware.validate:
logger.info "firmware update validated after connecting to network"
firmware-is-validation-pending = false
else:
logger.error "firmware update failed to validate"

// We run two tasks concurrently: One broadcasts the device identity
// via UDP and one serves incoming HTTP requests. We run the tasks
// in a group so if one of them terminates, we take the other one down
Expand Down

0 comments on commit c1c4e5d

Please sign in to comment.