Skip to content

Commit

Permalink
fixed serial formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
biomurph committed Sep 22, 2018
1 parent 5cf9b06 commit 9f2244a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Mousey/Mousey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ void Mousey::update(){
if(hid){
Mouse.move(deltaX, deltaY, wheelDelta);
}else{ // if !hid send the data to serial terminal
Serial.print(deltaX,DEC);Serial.print('\t');
Serial.print(deltaY,DEC);Serial.print('\t');
Serial.print(wheelDelta);Serial.print('\n');
Serial.print("x ");Serial.print(deltaX,DEC);Serial.print('\t');
Serial.print("y ");Serial.print(deltaY,DEC);Serial.print('\t');
Serial.print("w ");Serial.print(wheelDelta);Serial.print('\n');
}
wheelDelta = 0; // reset wheelDelta so we don't keep scrolling!
}
Expand Down Expand Up @@ -108,7 +108,7 @@ void Mousey::checkButtons() {
HIGH IS RELEASE, LOW IS PRESS
*/
void Mousey::sendButton(int activeButton, int state){
if(!hid){ Serial.print(activeButton); Serial.print(" ");}
if(!hid){ Serial.print("button "); Serial.print(activeButton); Serial.print(" = "); }
if(state){ //
if(hid){
Mouse.release(activeButton);
Expand Down

0 comments on commit 9f2244a

Please sign in to comment.