Skip to content

Commit 688bf3c

Browse files
committed
Set/get command for output bias via UART.
1 parent 56134b2 commit 688bf3c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

main.go

+14
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,20 @@ func main() {
199199
}
200200
break
201201

202+
case N2CMU_SET_OUTPUT_BIAS:
203+
for i := 0; i < int(network.OutputCount); i++ {
204+
network.OutputBias[i] = uart.ReadFloat32()
205+
}
206+
207+
uart.WriteOk()
208+
break
209+
210+
case N2CMU_GET_OUTPUT_BIAS:
211+
for i := 0; i < int(network.OutputCount); i++ {
212+
uart.WriteFloat32(network.OutputBias[i])
213+
}
214+
break
215+
202216
case N2CMU_SET_EPOCH_COUNT:
203217
epoch = uart.ReadUint16()
204218
break

0 commit comments

Comments
 (0)