MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / setSelfCalibrationHours

Method setSelfCalibrationHours

libraries/MTP40C/MTP40C.cpp:226–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224
225
226bool MTP40::setSelfCalibrationHours(uint16_t hrs)
227{
228 if ((hrs < 24) || (hrs > 720)) return false;
229 uint8_t cmd[7] = { 0xFE, 0x28, 0x6A, 0x64, 0x00, 0x0E, 0xA8 };
230 cmd[4] = hrs & 0xFF;
231 cmd[5] = hrs / 256;
232 if (request(cmd, 7, 6) )
233 {
234 return (_buffer[3] == 0x00);
235 }
236 return false;
237}
238
239
240uint16_t MTP40::getSelfCalibrationHours()

Callers 1

unittestFunction · 0.80

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.64