Closed chrisflesher closed 3 years ago
This is already possible. The following line should work:
pack(&bme, &Adafruit_BME280::readTemperature), F("get_temperature: @return: Temperature [C]")
Nice! Thanks.
And what is solution when this method is overloaded ? For example if Adafruit_BME280::readTemperature
has the following:
void Adafruit_BME280::readTemperature(uint8_t& degrees);
uint8_t Adafruit_BME280::readTemperature();
To select the first option, something like this should work:
(void(Adafruit_BME280::*)(uint8_t&))&Adafruit_BME280::readTemperature
Awesome! Thank you @jfjlaros
It would make things a bit more convenient if it were possible to use class functions with the template system:
I'm not sure how difficult / if it is worth doing this with the current template system? It is not too much trouble to just wrap these in another function.