Skip to content

Example not updated to SENSESP 3.0.0 and later? #19

Description

@Paluty

Hi, I had issues getting my Onewire setup to run again.

This finally worked:
`const uint8_t one_wire_pin = 17;

DallasTemperatureSensors* dts = new DallasTemperatureSensors(one_wire_pin);

const uint8_t read_delay = 1000;

//Measure exhaust temerpature
auto exhaust_temp =
new OneWireTemperature(dts, read_delay, "/exhaustTemperature/oneWire");

ConfigItem(exhaust_temp)
->set_title("Exhaust Temperature")
->set_description("Temperature of the engine exhaust")
->set_sort_order(100);

auto exhaust_temp_calibration =
new Linear(1.0, 0.0, "/exhaustTemperature/linear");

ConfigItem(exhaust_temp_calibration)
->set_title("Exhaust Temperature Calibration")
->set_description("Calibration for the engine exhaust temperature sensor")
->set_sort_order(200);

auto exhaust_temp_sk_output = new SKOutputFloat(
"propulsion.mainEngine.exhaustTemperature", "/exhaustTemperature/skPath");

ConfigItem(exhaust_temp_sk_output)
->set_title("Exhaust Temperature Signal K Path")
->set_description("Signal K path for the exhaust temperature")
->set_sort_order(300);

exhaust_temp->connect_to(exhaust_temp_calibration)
->connect_to(exhaust_temp_sk_output);`

In the example the code for coolant has been updated but not for the other 3 options. There is still the * behind auto:
https://github.com/SensESP/OneWire/blob/main/examples/onewire_temperature/onewire_temperature_example.cpp

I understand this was changed in the update to SENSESP 3.0.0. Changes are marked bold.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions