From 8d76823af7253927fafb0cf3c347d004c645dc6b Mon Sep 17 00:00:00 2001 From: Javier Cervantes Date: Thu, 10 Jul 2014 14:58:29 -0500 Subject: [PATCH] Fixing firmata out of bounds error --- platforms/firmata/firmata.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/firmata/firmata.go b/platforms/firmata/firmata.go index 60240214..556325eb 100644 --- a/platforms/firmata/firmata.go +++ b/platforms/firmata/firmata.go @@ -321,7 +321,7 @@ func (b *board) process(data []byte) { case AnalogMappingResponse: pinIndex := byte(0) - for _, val := range currentBuffer[2 : len(currentBuffer)-1] { + for _, val := range currentBuffer[2 : len(b.Pins)-1] { b.Pins[pinIndex].AnalogChannel = val