Fix magPresent typo

pull/128/head
John Hutchison 4 years ago
parent f4638cab7a
commit e64febd580
No known key found for this signature in database
GPG Key ID: 3E78C21F382F2C7D

@ -16,7 +16,7 @@ Adafruit_LIS3MDL lis3mdl;
long timer = 0;
int bmePresent;
int uvPresent;
int magRawPresent;
int magPresent;
int RXLED = 17; // The RX LED has a defined Arduino pin
int greenLED = 9;
int blueLED = 8;
@ -71,9 +71,9 @@ void setup() {
if (! lis3mdl.begin_I2C()) {
Serial.println("LIS3MDL sensor fault");
magRawPresent = 0;
magPresent = 0;
} else {
magRawPresent = 1;
magPresent = 1;
}
mpu6050.begin();
@ -177,7 +177,7 @@ void loop() {
{
Serial.print("0.0 0.0 ");
}
if (magRawPresent) {
if (magPresent) {
lis3mdl.read();
magRaw = (((lis3mdl.x + lis3mdl.y + lis3mdl.z) / 3));
magAbs = abs(magRaw);
@ -260,7 +260,7 @@ void loop() {
{
Serial1.print("0.0 0.0 ");
}
if (magRawPresent) {
if (magPresent) {
lis3mdl.read();
magRaw = (((lis3mdl.x + lis3mdl.y + lis3mdl.z) / 3));
magAbs = abs(magRaw);

Loading…
Cancel
Save

Powered by TurnKey Linux.