Tool/software: Code Composer Studio
Seemingly long integers are not correctly converted to decimal are being truncated inline via long to short conversion during base 10 division prior to ltoa() conversion to 8bit strings. The other oddity occurs during floating point division. Large values in the 1's position are left shifted 1 binary position, so 7 becomes 14 and the 10ths position is always 0.9. So 12.2 becomes 12.9 but 18.9 remains 18.9 after integer division via (float) declaration front of int32MOSTempValueHigh shown below. This issues occurs across several long variable names not just 1 variable being ported to serial UART transport.
Why does the int32 not correctly convert to floating values 0.1-0.9 when the inline input division occurs? Note the NexSendCmd() sets the Xfloat widget for the correct static decimal place as they are not dynamic floating decimal spinners like GUI composer. However it too has issues in the same floating division as occurs in the 1st example below, int32 << 1 occurs.
Why are the seconds count not properly creating characters 0-9 in the 1's place as seconds count rolls from 99 to 101, is always 104, 294, 304 etc.? Yet the seconds count 0-9 is converted and divides without character truncation (0-99) yet 1910 is output as 1949 seconds remains until Watch Element count (1999 rolls 2000) 1949 then becomes 2050. How is the division shown below struggling to divide turtle slow seconds counter? Have I made an integer division mistake or does the compiler not correctly convert long to short in this case integer truncation occurs?
// Set Xfloat decimal point 10's place
if((float)int32MOSTempValueHigh / 10 < 1000) { while(!(NexSendCmd("Hmostmpx.vvs0=2",0,0,0))); while(!(NexSendCmd("Hmostmpx.vvs1=1",0,0,0))); while(!(NexSendCmd("Hmostmpx.val=", (float)int32MOSTempValueHigh / 10, 0, 0))); }

