mirror of
https://github.com/skogaby/OpeNITHM.git
synced 2026-10-08 06:48:12 +03:00
Updates to match PCB
Changed pin names to match schematic and PCB per mickabrig7 Changed default pins numbers to match PCB Added ability to use digitalRead for IR sensors Changes tabs to 2 spaces (consistent with Arduino standard) Fixes build for 32U4 based processors (SerialOutput.h/.cpp is untested)
This commit is contained in:
+10
-10
@@ -10,20 +10,20 @@
|
||||
|
||||
void SerialOutput::sendKeyEvent(int key, bool pressed, bool doublePressed)
|
||||
{
|
||||
builtPacket.data = 0;
|
||||
builtPacket.keyEvent.isKeyboard = true;
|
||||
builtPacket.keyEvent.isPressed = pressed;
|
||||
builtPacket.keyEvent.isDoublePressed = doublePressed;
|
||||
builtPacket.keyEvent.key = key;
|
||||
builtPacket.data = 0;
|
||||
builtPacket.keyEvent.isKeyboard = true;
|
||||
builtPacket.keyEvent.isPressed = pressed;
|
||||
builtPacket.keyEvent.isDoublePressed = doublePressed;
|
||||
builtPacket.keyEvent.key = key;
|
||||
|
||||
Serial.write(builtPacket.data);
|
||||
Serial.write(builtPacket.data);
|
||||
}
|
||||
|
||||
void SerialOutput::sendSensorEvent(float position)
|
||||
{
|
||||
builtPacket.data = 0;
|
||||
builtPacket.sensorEvent.isKeyboard = false;
|
||||
builtPacket.sensorEvent.position = position * 127;
|
||||
builtPacket.data = 0;
|
||||
builtPacket.sensorEvent.isKeyboard = false;
|
||||
builtPacket.sensorEvent.position = position * 127;
|
||||
|
||||
Serial.write(builtPacket.data);
|
||||
Serial.write(builtPacket.data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user