Home
last modified time | relevance | path

Searched refs:result_string (Results 1 – 1 of 1) sorted by relevance

/Zephyr-latest/samples/subsys/smf/smf_calculator/src/
Dsmf_calculator_thread.c102 char result_string[RESULT_STRING_LENGTH]; in calculate_result() local
127 snprintf(result_string, RESULT_STRING_LENGTH, "% f", result); in calculate_result()
130 for (int i = strlen(result_string) - 1; i >= 0; i--) { in calculate_result()
131 if (result_string[i] != '0') { in calculate_result()
133 if (result_string[i] == '.') { in calculate_result()
134 result_string[i] = 0x00; in calculate_result()
136 result_string[i + 1] = 0x00; in calculate_result()
143 strncpy(s->result.string, result_string, CALCULATOR_STRING_LENGTH - 1); in calculate_result()