Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Aug 10, 2022
1 parent 47a7663 commit 1bb1c69
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sensor.zig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub const c = @cImport({
// Exported Functions

/// Read a Sensor and return the Sensor Data
pub fn read_sensor(
pub fn readSensor(
comptime SensorType: type, // Sensor Data Struct to be read, like c.struct_sensor_baro
comptime field_name: []const u8, // Sensor Data Field to be returned, like "temperature"
device_path: []const u8 // Path of Sensor Device, like "/dev/sensor/sensor_baro0"
Expand Down
6 changes: 3 additions & 3 deletions visual.zig
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub fn main() !void {
}

// Read the Temperature
const temperature: f32 = try sen.read_sensor(
const temperature: f32 = try sen.readSensor(
c.struct_sensor_baro, // Sensor Data Struct to be read
"temperature", // Sensor Data Field to be returned
"/dev/sensor/sensor_baro0" // Path of Sensor Device
Expand All @@ -37,7 +37,7 @@ pub fn main() !void {
});

// Read the Pressure
const pressure: f32 = try sen.read_sensor(
const pressure: f32 = try sen.readSensor(
c.struct_sensor_baro, // Sensor Data Struct to be read
"pressure", // Sensor Data Field to be returned
"/dev/sensor/sensor_baro0" // Path of Sensor Device
Expand All @@ -49,7 +49,7 @@ pub fn main() !void {
});

// Read the Humidity
const humidity: f32 = try sen.read_sensor(
const humidity: f32 = try sen.readSensor(
c.struct_sensor_humi, // Sensor Data Struct to be read
"humidity", // Sensor Data Field to be returned
"/dev/sensor/sensor_humi0" // Path of Sensor Device
Expand Down

0 comments on commit 1bb1c69

Please sign in to comment.