Yesterday, 09:52 PM
@Boatingbaileys,
I just tried to apply your Bildge code and go an error when compliing:
and the error I get when compiling is:
I have:
but still can't compile, any ideas?
I just tried to apply your Bildge code and go an error when compliing:
Code:
//// Bilge Monitor /////
auto* bilge = new DigitalInputState(17, INPUT_PULLUP, 5000);
auto int_to_string_function = [](int input) ->String {
if (input == 1) {
return "Water present!";
}
else { // input == 0
return "bilge clear";
}
};
auto int_to_string_transform = new LambdaTransform<int, String>(int_to_string_function);
bilge->connect_to(int_to_string_transform)
->connect_to(new SKOutputString("propulsion.engine.bilge"));
and the error I get when compiling is:
Code:
src/main.cpp:56:36: error: 'LambdaTransform' does not name a type
auto int_to_string_transform = new LambdaTransform<int, String>[](int_to_string_function);
^~~~~~~~~~~~~~~
src/main.cpp:56:52: error: expected primary-expression before 'int'
auto int_to_string_transform = new LambdaTransform<int, String>[](int_to_string_function);
I have:
Code:
#include "sensesp/system/lambda_consumer.h"