Hi Vasile, Thanks 🙂
I just came up with another idea. Using a float value makes the library big in ROM size (it easily adds 600 byte of ROM or more) and I only need one decimal. So I have another idea and that is return the distance in mm. In that case I only need a word as return value. So now I have only two functions: function hcsr04_get_distance_mili_meter() return word is function hcsr04_get_distance_mili_inch() return word is I only do not know if mili-inch is an English term. Would like to know that. Or should I use tens_of_cm and tens_of_inch? Thanks. Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens vasi vasi <[email protected]> Verzonden: zaterdag 30 september 2023 10:51 Aan: [email protected] <[email protected]> Onderwerp: Re: [jallib] English (function) question For a non-native English speaker like me, the function names are perfect! On Sat, Sep 30, 2023 at 11:40 AM [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>> wrote: Hi all. I have a question for English native speakers. I am working on a library for the HC-SR04 ultrasonic ranging module. I have functions that return the distance in cm and inch. My question is the following. One of the functions returns a word so the distance is without a decimal, so 2 cm, 5 inch, etc. The other function returns a float so the distance is with a decimal, so 3.5 cm, 5.1 inch. I am looking for a good name for these functions. I now have the following names but I am wondering if there is a better name for them: function hcsr04_get_distance_cm_coarse() return word is function hcsr04_get_distance_inch_coarse() return word is function hcsr04_get_distance_cm_fine() return float is function hcsr04_get_distance_inch_fine() return float is So I am looking for a better name for these functions. Any suggestions? Thanks. Kind regards, Rob -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/655e1cd1-adaf-49d9-b645-9ddcef475248n%40googlegroups.com<https://groups.google.com/d/msgid/jallib/655e1cd1-adaf-49d9-b645-9ddcef475248n%40googlegroups.com?utm_medium=email&utm_source=footer>. -- Vasi -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/CABsDq%3D86Jh5W8jHyb8VdQvvOJbrin%2BEzLTHKnkOsfzbLsR7-XQ%40mail.gmail.com<https://groups.google.com/d/msgid/jallib/CABsDq%3D86Jh5W8jHyb8VdQvvOJbrin%2BEzLTHKnkOsfzbLsR7-XQ%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/GVXP195MB163796241C555E0C1AB38BDBE6C7A%40GVXP195MB1637.EURP195.PROD.OUTLOOK.COM.
