diff --git a/libsweep/src/unix/serial.cc b/libsweep/src/unix/serial.cc index 14c475e..27c92f5 100644 --- a/libsweep/src/unix/serial.cc +++ b/libsweep/src/unix/serial.cc @@ -26,6 +26,15 @@ static speed_t get_baud(int32_t bitrate) { throw error{"Only baud rate 115200 is supported at this time."}; return -1; } + + // Translate human readable bitrate to termios bitrate + if (bitrate == 115200) + { + #ifdef B115200 + bitrate = B115200; + #endif + } + return bitrate; } diff --git a/libsweep/sweep-sdk.config b/libsweep/sweep-sdk.config new file mode 100644 index 0000000..e0284f4 --- /dev/null +++ b/libsweep/sweep-sdk.config @@ -0,0 +1,2 @@ +// Add predefined macros for your project here. For example: +// #define THE_ANSWER 42 diff --git a/libsweep/sweep-sdk.creator b/libsweep/sweep-sdk.creator new file mode 100644 index 0000000..e94cbbd --- /dev/null +++ b/libsweep/sweep-sdk.creator @@ -0,0 +1 @@ +[General] diff --git a/libsweep/sweep-sdk.creator.user b/libsweep/sweep-sdk.creator.user new file mode 100644 index 0000000..30d13e5 --- /dev/null +++ b/libsweep/sweep-sdk.creator.user @@ -0,0 +1,198 @@ + + + + + + EnvironmentId + {01e8a017-4a09-471e-9fb1-04e85165f122} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + true + false + 0 + true + true + 0 + 8 + true + 1 + true + true + true + false + + + + ProjectExplorer.Project.PluginSettings + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop + {fd8f30e6-878f-4408-b717-76607a45c3fd} + 0 + 0 + 0 + + /home/vrong/workspace/sweep-sdk/libsweep + + + + all + + false + + + true + Make + + GenericProjectManager.GenericMakeStep + + 1 + Compiler + + ProjectExplorer.BuildSteps.Build + + + + + clean + + true + + + true + Make + + GenericProjectManager.GenericMakeStep + + 1 + Nettoyer + + ProjectExplorer.BuildSteps.Clean + + 2 + false + + Défaut + Défaut + GenericProjectManager.GenericBuildConfiguration + + 1 + + + 0 + Déploiement + + ProjectExplorer.BuildSteps.Deploy + + 1 + Déployer localement + + ProjectExplorer.DefaultDeployConfiguration + + 1 + + + false + false + 1000 + + true + + false + false + false + false + true + 0.01 + 10 + true + 1 + 25 + + 1 + true + false + true + valgrind + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + + 2 + + + + %{buildDir} + Custom Executable + + ProjectExplorer.CustomExecutableRunConfiguration + 3768 + false + true + false + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 18 + + + Version + 18 + + diff --git a/libsweep/sweep-sdk.files b/libsweep/sweep-sdk.files new file mode 100644 index 0000000..09f67b2 --- /dev/null +++ b/libsweep/sweep-sdk.files @@ -0,0 +1,21 @@ +build/CMakeFiles/3.7.2/CompilerIdC/CMakeCCompilerId.c +build/CMakeFiles/3.7.2/CompilerIdCXX/CMakeCXXCompilerId.cpp +build/CMakeFiles/feature_tests.c +build/CMakeFiles/feature_tests.cxx +build/include/sweep/config.h +examples/example.c +examples/example.cc +examples/net.cc +examples/viewer.cc +include/sweep/sweep.h +include/sweep/sweep.hpp +include/error.hpp +include/protocol.hpp +include/queue.hpp +include/serial.hpp +src/unix/serial.cc +src/win/serial.cc +src/dummy.cc +src/protocol.cc +src/sweep-ctl.cc +src/sweep.cc \ No newline at end of file diff --git a/libsweep/sweep-sdk.includes b/libsweep/sweep-sdk.includes new file mode 100644 index 0000000..7bdd543 --- /dev/null +++ b/libsweep/sweep-sdk.includes @@ -0,0 +1,2 @@ +build/include/sweep +include/sweep \ No newline at end of file