MCPcopy Create free account
hub / github.com/OpenEarable/open-earable / get_data

Method get_data

src/custom_sensor/BARO_Sensor.cpp:34–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34void BARO_Sensor::get_data(int sensorID, byte *data) {
35 float val;
36
37 if (sensorID != BARO_TEMP) {
38 memset(data, 0, 8);
39 return;
40 }
41
42 /*float * floatArray = (float*)data;
43 get_pressure(val);
44 floatArray[0] = val;
45
46 get_temperature(val);
47 floatArray[1] = val;*/
48
49 float * floatArray = (float*)data;
50 get_pressure_and_temperature(floatArray);
51 /*get_pressure(val);
52 floatArray[0] = val;
53
54 get_temperature(val);
55 floatArray[1] = val;*/
56}
57
58int BARO_Sensor::get_sensor_count() {
59 return sensor_count;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected