Skip to content

How to "get" the int_val() #25

@mrWheel

Description

@mrWheel

(insert code does not seem to work.. not with ticks and not with code)
Given this code example:

struct Printer {

template<typename Item>

void apply(Item &i) {

  if (i.present()) {

    Serial.print(Item::name);

    Serial.print(F(": "));

    Serial.print(i.val());

    Serial.print(Item::unit());

    Serial.println();

  }

}

};

.. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions