@ -30,6 +30,7 @@ class NoMouse {
void begin ( ) { }
void begin ( ) { }
void sendReport ( ) { }
void sendReport ( ) { }
void move ( int8_t x , int8_t y , int8_t vWheel , int8_t hWheel ) { }
void move ( int8_t x , int8_t y , int8_t vWheel , int8_t hWheel ) { }
void stop ( bool x , bool y , bool vWheel , bool hWheel ) { }
void releaseAll ( ) { }
void releaseAll ( ) { }
void press ( uint8_t buttons ) { }
void press ( uint8_t buttons ) { }
void release ( uint8_t buttons ) { }
void release ( uint8_t buttons ) { }
@ -63,17 +64,7 @@ class Mouse {
mouse_ . move ( x , y , vWheel , hWheel ) ;
mouse_ . move ( x , y , vWheel , hWheel ) ;
}
}
void stop ( bool x , bool y , bool vWheel = false , bool hWheel = false ) {
void stop ( bool x , bool y , bool vWheel = false , bool hWheel = false ) {
HID_MouseReport_Data_t report = mouse_ . getReport ( ) ;
mouse_ . stop ( x , y , vWheel , hWheel ) ;
if ( x )
report . xAxis = 0 ;
if ( y )
report . yAxis = 0 ;
if ( vWheel )
report . vWheel = 0 ;
if ( hWheel )
report . hWheel = 0 ;
move ( report . xAxis , report . yAxis , report . vWheel , report . hWheel ) ;
}
}
void releaseAllButtons ( ) {
void releaseAllButtons ( ) {
mouse_ . releaseAll ( ) ;
mouse_ . releaseAll ( ) ;