energia / msp432r-core

MSP432 EMT core for the production silicon (RED LaunchPad only)
2 stars 5 forks source link

Code Behaves Differently Against MSP432 Black and Red #11

Closed rei-vilo closed 6 years ago

rei-vilo commented 6 years ago

The same code behaves differently when used against the RED LaunchPad w/ msp432 EMT (48MHz) boards package release 5.6.1 and the LaunchPad w/ msp432 EMT (48MHz) boards package release 3.8.0.

The code uses the vsprintf() function to format a number. It seems to be missing when targeting the RED LaunchPad w/ msp432 EMT (48MHz) boards package release 5.6.1.

Results

oC

+23.4 oC

Code


#include "stdarg.h"
#include "stdio.h"

char bufferOut[128];

String formatString(const char * format, ...)
{
  va_list args;
  va_start(args, format);
  vsprintf(bufferOut, format, args);

  va_end(args);
  return String(bufferOut);
}

float temperature = 23.4;

void setup() {
  Serial.begin(9600);
  delay(500);

  Serial.println();
  Serial.println((formatString("%+6.1f oC", temperature)));
}

void loop() {

}

Boards Packages Releases

capture 2018-06-08 a 10 31 54
rei-vilo commented 6 years ago

Issue still opened with release 5.23.1.

rei-vilo commented 6 years ago

See #17.