Skip to content

rename writeEEPROM to writeMLXEEPROM #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/SparkFunMLX90614.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,15 @@ uint8_t IRTherm::setMax(float maxTemp)
// Convert the unit-ed value to a raw ADC value:
int16_t rawMax = calcRawTemp(maxTemp);
// Write that value to the TOMAX EEPROM address:
return writeEEPROM(MLX90614_REGISTER_TOMAX, rawMax);
return writeMLXEEPROM(MLX90614_REGISTER_TOMAX, rawMax);
}

uint8_t IRTherm::setMin(float minTemp)
{
// Convert the unit-ed value to a raw ADC value:
int16_t rawMin = calcRawTemp(minTemp);
// Write that value to the TOMIN EEPROM address:
return writeEEPROM(MLX90614_REGISTER_TOMIN, rawMin);
return writeMLXEEPROM(MLX90614_REGISTER_TOMIN, rawMin);
}

uint8_t IRTherm::setEmissivity(float emis)
Expand All @@ -194,7 +194,7 @@ uint8_t IRTherm::setEmissivity(float emis)
ke = constrain(ke, 0x2000, 0xFFFF);

// Write that value to the ke register
return writeEEPROM(MLX90614_REGISTER_KE, (int16_t)ke);
return writeMLXEEPROM(MLX90614_REGISTER_KE, (int16_t)ke);
}

float IRTherm::readEmissivity()
Expand Down Expand Up @@ -234,7 +234,7 @@ bool IRTherm::setAddress(uint8_t newAdd)
tempAdd |= newAdd; // Add the new address

// Write the new addres back to EEPROM:
return writeEEPROM(MLX90614_REGISTER_ADDRESS, tempAdd);
return writeMLXEEPROM(MLX90614_REGISTER_ADDRESS, tempAdd);
}
return 0;
}
Expand Down Expand Up @@ -388,7 +388,7 @@ bool IRTherm::I2CReadWord(uint8_t reg, int16_t * dest)
}
}

bool IRTherm::writeEEPROM(uint8_t reg, int16_t data)
bool IRTherm::writeMLXEEPROM(uint8_t reg, int16_t data)
{
// Clear out EEPROM first:
if (I2CWriteWord(reg, 0) != 0)
Expand Down
2 changes: 1 addition & 1 deletion src/SparkFunMLX90614.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class IRTherm

// Abstract function to write 16-bits to an address in the MLX90614's
// EEPROM
bool writeEEPROM(uint8_t reg, int16_t data);
bool writeMLXEEPROM(uint8_t reg, int16_t data);

// Abstract functions to read and write 16-bit values from a RAM
// or EEPROM address in the MLX90614
Expand Down