Skip to content

Commit b302c97

Browse files
committed
Renamed loc to geo
1 parent d2b284e commit b302c97

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

rust/app/src/app_sensor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ fn convert_sensor_data(sensor_data: sensor_data_ptr, sensor_type: sensor_type_t)
121121
// Construct and return a new `SensorValue` (without semicolon)
122122
SensorValue {
123123
key: &TEMP_SENSOR_KEY, // Sensor data key is `t`
124-
loc: SensorValueType::None, // No location
124+
geo: SensorValueType::None, // No location
125125
val: match sensor_type {
126126
SENSOR_TYPE_AMBIENT_TEMPERATURE_RAW => { // If this is raw temperature...
127127
// Interpret the sensor data as a `sensor_temp_raw_data` struct that contains raw temp.

rust/app/src/gps_sensor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ fn convert_gps_data(sensor_data: sensor_data_ptr, sensor_type: sensor_type_t) ->
109109
// Construct and return a new `SensorValue` (without semicolon)
110110
SensorValue {
111111
key: &GPS_SENSOR_KEY, // Sensor data key is `geolocation`
112-
loc: SensorValueType::None,
112+
geo: SensorValueType::None,
113113
val: match sensor_type {
114114
SENSOR_TYPE_GEOLOCATION => { // If sensor data is GPS geolocation...
115115
// Interpret the sensor data as a `sensor_geolocation_data` struct that contains GPS geolocation.
@@ -146,7 +146,7 @@ fn aggregate_sensor_data(sensor_value: SensorValue) {
146146
unsafe { current_geolocation = sensor_value.val };
147147
} else {
148148
// Attach the current geolocation to the sensor data for transmission.
149-
sensor_value.loc = current_geolocation;
149+
sensor_value.geo = current_geolocation;
150150
// TODO: Transmit sensor value with geolocation.
151151
}
152152
}

rust/mynewt/src/hw/sensor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ pub struct SensorValue {
248248
/// The type of the sensor value and the value.
249249
pub val: SensorValueType,
250250
/// Geolocation associated with the sensor value.
251-
pub loc: SensorValueType,
251+
pub geo: SensorValueType,
252252
}
253253

254254
/// Default sensor value is `None`
@@ -258,7 +258,7 @@ impl Default for SensorValue {
258258
SensorValue {
259259
key: &init_strn!(""),
260260
val: SensorValueType::None,
261-
loc: SensorValueType::None,
261+
geo: SensorValueType::None,
262262
}
263263
}
264264
}

0 commit comments

Comments
 (0)