Skip to content

Commit

Permalink
Set/get command for output bias via UART.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Apr 20, 2024
1 parent 56134b2 commit 688bf3c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,20 @@ func main() {
}
break

case N2CMU_SET_OUTPUT_BIAS:
for i := 0; i < int(network.OutputCount); i++ {
network.OutputBias[i] = uart.ReadFloat32()
}

uart.WriteOk()
break

case N2CMU_GET_OUTPUT_BIAS:
for i := 0; i < int(network.OutputCount); i++ {
uart.WriteFloat32(network.OutputBias[i])
}
break

case N2CMU_SET_EPOCH_COUNT:
epoch = uart.ReadUint16()
break
Expand Down

0 comments on commit 688bf3c

Please sign in to comment.