Tool/software: Code Composer Studio
Hi,
I'm using MSP-EXP430FR2433.
This board does not have enough memory to use sscanf with float format. (like latitude)
1. how to get float value?
2. Sometimes I get $GPRMC,075643.00,A,2237.93764,N,12017.28144,E,,,110618,,,A*7C.
how to get char array in continuously delimiter?
I can't get the string "110618"
simple example:
It is work if the string is "$GPRMC,A,B,C*XX"
but not work in "$GPRMC,,B,C*XX"
#include <msp430.h>
#include <stdio.h>
int main()
{
//char buf[50]="$GPRMC,A,B,C*XX";
char buf[50]="$GPRMC,,B,C*XX";
char tmp1[10]={0},tmp2[10]={0};
sscanf(buf,"$GPRMC,%[^,],%[^,],*XX",tmp1,tmp2);
printf(tmp1);
printf(tmp2);
return 0;
}