Datenkonvertierung Motorola(Big Endian) zu Intel(Little endian)

More
31 Oct 2018 14:02 #119710 by andrax
Hallo,

ich muss jetzt das Thema doch noch mal auf machen.

Die Datenkonvertierung funktioniert und ich bekomme die Positionsdaten richtig angezeigt.
Wenn gewünscht, kann ich auch den Code hier einstellen, auch wenn er wahrscheinlich unter aller Sau ist.
Allerdings habe ich ein Anzeige bzw. Skalierungsproblem.

Ich bekomme beispielsweise einen Wert (float) 3775, was 3,775mm entspricht.
In Linuxcnc jedoch wird 3775.000 angezeigt, was 3775mm entspricht.

Wie kann ich das Korrigieren?

vielen Dank im Voraus.

Andre

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

More
31 Oct 2018 15:45 - 31 Oct 2018 15:45 #119715 by andypugh
pin out float out;
...
    out = (temp1 | temp2) /1000.0;
Last edit: 31 Oct 2018 15:45 by andypugh.

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

More
05 Nov 2018 10:58 #119981 by andrax

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

Time to create page: 0.061 seconds
Powered by Kunena Forum