diff options
| author | HampusM <hampus@hampusmat.com> | 2022-03-07 10:08:56 +0100 | 
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2022-03-07 10:08:56 +0100 | 
| commit | 49a5d3d3fb0dccf1b993aeea4b803cd079a1e66f (patch) | |
| tree | d733c14f6a3af3f9ed19ce7eddeaedfc6e93d10a | |
| parent | da2ec747227ac1716326bd076219c7f7a2bb3887 (diff) | |
feat: uncomment sensor value printing in loop function
| -rw-r--r-- | src/gyronardo.cpp | 23 | 
1 files changed, 4 insertions, 19 deletions
| diff --git a/src/gyronardo.cpp b/src/gyronardo.cpp index 63b4bfc..d8aaf0e 100644 --- a/src/gyronardo.cpp +++ b/src/gyronardo.cpp @@ -71,14 +71,10 @@ void setup()  		 << "Gyro Z: " << sensor.gyro_cal_z << "\n";  	sout << "Starting..." << endl; - -	sout << "Pitch: " << sensor.getPitch() << "  " -		 << "Roll: " << sensor.getRoll() << endl;  }  void loop()  { -	/*  	delay(SENSOR_THROTTLE_TIME);  	if (!sensor.read()) @@ -87,25 +83,14 @@ void loop()  		if (status == SensorStatus::THROTTLED)  		{ -			printSerial("Warning: The sensor was read too frequently and throttled"); -			endl(); - +			sout << "Warning: The sensor was read too frequently and throttled" << endl;  			return;  		} -		printSerial("Error: Failed to read sensor. Status: %d", static_cast<int>(status)); -		endl(); - +		sout << "Error: Failed to read sensor. Status: " << static_cast<int>(status) +			 << endl;  		stop();  	} -	char *pitch = floatToStr(sensor.getPitch(), FLOAT_WIDTH, FLOAT_PRECISION); -	char *roll = floatToStr(sensor.getRoll(), FLOAT_WIDTH, FLOAT_PRECISION); - -	printSerial("\rPitch: %s	Roll: %s", pitch, roll); -	Serial.flush(); - -	free(pitch); -	free(roll); -	*/ +	sout << "Pitch: " << sensor.getPitch() << "    Roll: " << sensor.getRoll() << endl;  } | 
