From 170c5ae3e18c9215518ed208158faf816e13a58c Mon Sep 17 00:00:00 2001 From: Niels Date: Fri, 28 May 2021 20:13:09 +0200 Subject: [PATCH] Fixed an cast-exception --- src/main/java/org/firmata4j/firmata/FirmataDevice.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/firmata4j/firmata/FirmataDevice.java b/src/main/java/org/firmata4j/firmata/FirmataDevice.java index 591f0ea..cc3297c 100644 --- a/src/main/java/org/firmata4j/firmata/FirmataDevice.java +++ b/src/main/java/org/firmata4j/firmata/FirmataDevice.java @@ -518,7 +518,7 @@ public void accept(Event event) { @Override public void accept(Event event) { byte address = (Byte) event.getBodyItem(I2C_ADDRESS); - int register = (Integer) event.getBodyItem(I2C_REGISTER); + byte register = (Byte) event.getBodyItem(I2C_REGISTER); byte[] message = (byte[]) event.getBodyItem(I2C_MESSAGE); FirmataI2CDevice device = i2cDevices.get(address); if (device != null) {