HCoop
/
clinton
/
Smoothieware.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactors
[clinton/Smoothieware.git]
/
src
/
libs
/
utils.h
diff --git
a/src/libs/utils.h
b/src/libs/utils.h
index
05ad7d7
..
b8b2a69
100644
(file)
--- a/
src/libs/utils.h
+++ b/
src/libs/utils.h
@@
-1,15
+1,14
@@
-#ifndef
utils_h
-#define
utils_h
+#ifndef
UTILS_H
+#define
UTILS_H
#include <stdint.h>
#include <stdint.h>
-using namespace std;
#include <string>
#include <vector>
#include <string>
#include <vector>
-using std::string;
-extern volatile bool _isr_context;
+using std::string;
+using std::vector;
-string lc(
string
str);
+string lc(
const string&
str);
bool is_alpha( int );
bool is_digit( int );
bool is_alpha( int );
bool is_digit( int );
@@
-17,16
+16,20
@@
bool is_numeric( int );
bool is_alphanum( int );
bool is_whitespace( int );
bool is_alphanum( int );
bool is_whitespace( int );
+vector<string> split(const char *str, char c = ',');
+vector<float> parse_number_list(const char *str);
+vector<uint32_t> parse_number_list(const char *str, uint8_t radix);
+
string remove_non_number( string str );
uint16_t get_checksum(const string& to_check);
uint16_t get_checksum(const char* to_check);
string remove_non_number( string str );
uint16_t get_checksum(const string& to_check);
uint16_t get_checksum(const char* to_check);
-void get_checksums(uint16_t check_sums[], const string key);
+void get_checksums(uint16_t check_sums[], const string
&
key);
string shift_parameter( string ¶meters );
string shift_parameter( string ¶meters );
-string get_arguments(
string
possible_command );
+string get_arguments(
const string&
possible_command );
bool file_exists( const string file_name );
bool file_exists( const string file_name );
@@
-34,5
+37,8
@@
void system_reset( bool dfu= false );
string absolute_from_relative( string path );
string absolute_from_relative( string path );
+int append_parameters(char *buf, std::vector<std::pair<char,float>> params, size_t bufsize);
+string wcs2gcode(int wcs);
+void safe_delay(uint32_t delay);
#endif
#endif