Closed JohnySeven closed 2 years ago
I have this in one of my test projects:
auto hdg = new SKValueListener<float>("navigation.headingMagnetic");
hdg->connect_to(new LambdaConsumer<float>(
[](float input) { debugD("Heading: %f", input); }));
and it works just fine.
I tried switching to using the low-level observer interface:
hdg->attach([hdg]() {
debugD("Heading: %f", hdg->get());
});
and it still works just fine (although I'd recommend using LambdaConsumer<>
instead - there's less room for obscure errors that way).
However, if I switch from debugD
to log_i
, I don't get any output. Following the log_i
symbol in VSCode suggests that ARDUHAL_LOG_LEVEL
is defined lower as ARDUHAL_LOG_LEVEL_INFO
.
Since the problem would seem to be in the callback function use, I'm closing this issue. If you think there's an actual unrelated SKValueListener
issue, feel free to reopen.
Hey guys,
today I was trying to make device with SIM800L that will listen to
navigation.position
and relay X,Y via GPRS to remote server. It looks like that SKListeners are broken as I can see many crashes when update from Signal K server arrives, here is my example:Here is narrowed down code of main.cpp:
As it's visible from log SK update deltas with
navigation.speedOverGround
are comming in, but Speed isn't printed in console. I'm using SensESP git hub template.I've added few log lines into
WSClient::process_received_updates()
and it looks like it's not called at all.