-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to "get" the int_val() #25
Comments
I had to dig into the code again, it has been a while and maybe I made this thing too complex :-p Anyway, I think the problem is that the Since To fix this, you need to have different apply functions based on the type of For example, you could do something like:
I have not tested this, but I expect this to work. You can do the same thing for From your e-mail, I gather you're building a JSON-printer. Nice idea! If you get it to work, would you share the result? That would be awesome to include as an example. I should probably also properly document how this printer thing works, and using a JSON printer would be a great example to illustrate that. |
W00ps, I accidentally used |
So I seem to be running into the same issue, and I don't have enough C++ knowledge to understand what is going on here. First, i tried the example in your reply, but that doesn't seem to be correct, as here I don't have access to the |
I think my previous suggestion was not actually working because there is no single So I think it should be something like this (again untested, just did this quickly after looking at he code a bit more):
Note that:
Let me know if this helps (and feel free to ask again if it doesn't work, I can probably find time to look a bit deeper and test code if needed). I wonder if the datastructure could/should be refactored to make this stuff easier somehow... |
I created a push request (#32) that has no conflict with the rest of the code and adds an example for this. |
@mrWheel thanks!! That example made my compiler happy! Unfortunately, I can't test if it actually works, because it appears that my P1 meter is unwilling to provide enough power for my esp8266. I'll rig up something with an external supply the coming days, to see if it works that way. |
That is very very fancy, thanks. More than I need I think, but contains lots of good info and inspiration. FYI I'm trying to build this into a Homie sensor node, to feed the data into my home automation setup, see here if you're not familiar yet with Homie :) |
(insert code does not seem to work.. not with
ticks
and not withcode
)Given this code example:
struct Printer {
};
.. how do I get the int_val()???
tried everything I can think off ..
Item::int_val
Item::int_val()
i.int_val()
i.int_val()
Thanks in advance!
The text was updated successfully, but these errors were encountered: