diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-10-07 12:52:48 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-10-07 12:52:48 +0200 |
commit | 4ba4135c3b74f786b6ad795e2e9efd7271409b7f (patch) | |
tree | 27c4da7ce416c513f8cdc666f8a900df19d7cf83 /Tools/tests-host/sf0x_test.cpp | |
parent | cebdae438d3f24075aab09275a537f02c5113b36 (diff) | |
download | px4-firmware-4ba4135c3b74f786b6ad795e2e9efd7271409b7f.tar.gz px4-firmware-4ba4135c3b74f786b6ad795e2e9efd7271409b7f.tar.bz2 px4-firmware-4ba4135c3b74f786b6ad795e2e9efd7271409b7f.zip |
Code style fixes, no code changes
Diffstat (limited to 'Tools/tests-host/sf0x_test.cpp')
-rw-r--r-- | Tools/tests-host/sf0x_test.cpp | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/Tools/tests-host/sf0x_test.cpp b/Tools/tests-host/sf0x_test.cpp index 6b98c2427..82d19fcbe 100644 --- a/Tools/tests-host/sf0x_test.cpp +++ b/Tools/tests-host/sf0x_test.cpp @@ -8,7 +8,8 @@ #include <drivers/sf0x/sf0x_parser.h> -int main(int argc, char *argv[]) { +int main(int argc, char *argv[]) +{ warnx("SF0X test started"); int ret = 0; @@ -18,22 +19,22 @@ int main(int argc, char *argv[]) { _linebuf[0] = '\0'; const char *lines[] = {"0.01\r\n", - "0.02\r\n", - "0.03\r\n", - "0.04\r\n", - "0", - ".", - "0", - "5", - "\r", - "\n", - "0", - "3\r", - "\n" - "\r\n", - "0.06", - "\r\n" - }; + "0.02\r\n", + "0.03\r\n", + "0.04\r\n", + "0", + ".", + "0", + "5", + "\r", + "\n", + "0", + "3\r", + "\n" + "\r\n", + "0.06", + "\r\n" + }; enum SF0X_PARSE_STATE state = SF0X_PARSE_STATE0_UNSYNC; float dist_m; @@ -46,14 +47,14 @@ int main(int argc, char *argv[]) { int parse_ret; - for (int i = 0; i < strlen(lines[l]); i++) - { + for (int i = 0; i < strlen(lines[l]); i++) { parse_ret = sf0x_parser(lines[l][i], _parserbuf, &_parsebuf_index, &state, &dist_m); if (parse_ret == 0) { printf("\nparsed: %f %s\n", dist_m, (parse_ret == 0) ? "OK" : ""); } } + printf("%s", lines[l]); } |