Modifications

Sauter à la navigation Sauter à la recherche
181 octets ajoutés ,  1 mai 2016 à 12:50
Ligne 99 : Ligne 99 :     
== Conversion en virgule flottante ==
 
== Conversion en virgule flottante ==
Like the AVR Arduinos, the M0 library does not have full support for converting floating point numbers to ASCII strings. Functions like sprintf will not convert floating point. Fortunately, the standard AVR-LIBC library includes the dtostrf function which can handle the conversion for you.
+
Comme pour les AVR Arduino, la bibliothèque M0 n'a pas un support complet pour pour la conversion des nombres en virgule flottante en chaine ASCII. Les fonctions comme sprintf ne convertira pas les nombres en virgule flottante. Par chance, la bibliothèque standard AVR-LIBC inclus la fonction {{fname|dtostrf}} peut prendre en charge cette conversion.
   −
Unfortunately, the M0 run-time library does not have dtostrf.  You may see some references to using '''#include <avr/dtostrf.h>''' to get dtostrf in your code. And while it will compile, it does not work.
+
Malheureusement, la bibliothèque run-time du M0 ne dispose pas de {{fname|dtostrf}}Vous pourriez rencontrer quelques références utilisant '''#include <avr/dtostrf.h>''' pour inclure dtostrf dans votre code... mais même si cela compile, dtostrf ne fonctionnera pas!
   −
Instead, check out this thread to find a working dtostrf function you can include in your code:
+
Nous vous proposons de prendre connaissance du fil de discussion suivat pour trouver une fonction dtostrf que vous pourriez inclure dans votre code:
    
[http://forum.arduino.cc/index.php?topic=368720.0 http://forum.arduino.cc/index.php?topic=368720.0]
 
[http://forum.arduino.cc/index.php?topic=368720.0 http://forum.arduino.cc/index.php?topic=368720.0]
29 917

modifications

Menu de navigation