Browse Source

Fix warnings

X-Ryl669 4 years ago
parent
commit
a26f3569da
2 changed files with 4 additions and 4 deletions
  1. 2 2
      clock-mcu/src/firmware/gesture.h
  2. 2 2
      clock-mcu/src/firmware/touch.h

+ 2 - 2
clock-mcu/src/firmware/gesture.h

@@ -48,7 +48,7 @@ void setupGesture () {
 	200 LED_BOOST = 2
 	300 LED_BOOST = 3
 	*/
-	apds.setLED(0x3,0x0); //onion.io Aug 16 2018: lower LED power improves touch performance
+	apds.setLED((apds9960LedDrive_t)0x3, APDS9960_LEDBOOST_100PCNT); //onion.io Aug 16 2018: lower LED power improves touch performance, interface in the library is fucked up, if using the enum it'll be too large to fit
 
 #endif // GESTURE_ENABLED
 }
@@ -123,7 +123,7 @@ void handleGesture() {
 void handleAmbientLight() {
 	uint16_t val = 0;
 	uint16_t delta;
-	bool status;
+	bool status = false;
 
 #if GESTURE_ENABLED && GESTURE_SPARKFUN_ENABLED
 	status = apds.readAmbientLight(val);

+ 2 - 2
clock-mcu/src/firmware/touch.h

@@ -35,7 +35,7 @@ static void read_i2c_bytes(uint8_t addr, uint8_t numBytes, uint8_t *values) {
   // Wire._I2C_WRITE((byte)reg);
   // Wire.endTransmission();
 
-  Wire.requestFrom(addr, (byte)2, true);
+  Wire.requestFrom(addr, (byte)2, (byte)true);
   while (Wire.available()) {
 	  if (count < numBytes) {
 		  values[count] = Wire.read();
@@ -99,7 +99,7 @@ uint8_t handleTouch() {
 void sendButtonCommand(uint8_t buttons, uint32_t timePressed) {
   char buf[64];
 	// send button status via serial
-	sprintf(buf, "%02x%d", buttons, timePressed);
+	sprintf(buf, "%02x%lu", buttons, timePressed);
 	sendCommand(CMD_SEND_TOUCH, buf);
 }