INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

INDI libraries' use of invalid printf number format specifiers

  • Posts: 33
  • Thank you received: 0
I am finding frequent use of %.f as the number format specifier for numeric values. I don't think that is a valid specifier. The dot '.' starts the precision field and the docs I am finding indicate that an integer value must follow the dot. An example of this is in libindi-3rdparty/indi-celestronaux/celstronaux.cpp. and in libindi ccd_simulator.cpp

The INDI standard, docs.indilib.org/protocol/INDI.pdf, is annoyingly vague about this, saying only "A numberFormat shall be any string that includes exactly one printf-style format specification appropriate for C-type double
or one INDI style "m" to specify sexagesimal...". I am sure there are some printf implementations for which this is valid but I don't think it is standard. I know Java doesn't understand the intent of "%.f".

I am slowing relearning C/C++ and INDI lib, being motivated by problems I am having with the indi_celestron_aux driver. Maybe I'm all wet but what's up with this number format specifier?
8 months 1 hour ago #93760

Please Log in or Create an account to join the conversation.

Time to create page: 0.630 seconds