- if (g_strstr_len(sample_points_string, -1, ".") != NULL) {
- first = strtok(sample_points_string, ".");
- concat = strcat(first, strtok(NULL, "."));
- if (sr_atof_ascii(concat, &fvalue) != SR_OK || fvalue == 0.0) {
- sr_dbg("Invalid float converted from scope response.");
- return SR_ERR;
- }
- } else {
- if (sr_atof_ascii(sample_points_string, &fvalue) != SR_OK || fvalue == 0.0) {
- sr_dbg("Invalid float converted from scope response.");
- return SR_ERR;
- }
+ if (g_strstr_len(sample_points_string, -1, "Mpts") != NULL) {
+ sample_points_string[strlen(sample_points_string) -4] = '\0';
+ if (sr_atof_ascii(sample_points_string, &fvalue) != SR_OK) {
+ sr_dbg("Invalid float converted from scope response.");
+ return SR_ERR;