-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for dst + fix tests (were working only in CET)
- Loading branch information
Showing
9 changed files
with
199 additions
and
226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,15 @@ | ||
# cython: c_string_type=unicode, c_string_encoding=utf8 | ||
|
||
cdef extern from "logger_fit_c.hpp": | ||
cdef bint write_log_c(const char* db_file) except + | ||
#cdef bint write_log_c(const char* db_file) | ||
cdef bint write_log_c(const char* db_file, const char* filename, const char* start_date, const char* end_date) except + | ||
cdef cppclass config: | ||
unsigned int G_UNIT_ID_HEX | ||
char* G_LOG_START_DATE | ||
char* G_LOG_DIR | ||
char* G_UPLOAD_FILE | ||
cdef void set_config_c(const config& _cfg) | ||
cdef char* get_upload_file_name_c() | ||
cdef char* get_start_date_str_c() | ||
|
||
def write_log_cython(str db_file): | ||
py_byte_string = db_file.encode('UTF-8') | ||
cdef char* c_db_file = py_byte_string | ||
return write_log_c(c_db_file) | ||
def write_log_cython(str db_file, str filename, str start_date, str end_date): | ||
return write_log_c(db_file, filename, start_date, end_date) | ||
|
||
def set_config(G_CONFIG): | ||
cdef config cfg | ||
py_byte_string = G_CONFIG.G_LOG_DIR.encode('UTF-8') | ||
cfg.G_LOG_DIR = py_byte_string | ||
cfg.G_UNIT_ID_HEX = G_CONFIG.G_UNIT_ID_HEX | ||
set_config_c(cfg) | ||
|
||
def get_upload_file_name(): | ||
return get_upload_file_name_c().decode('UTF-8') | ||
|
||
def get_start_date_str(): | ||
return get_start_date_str_c().decode('UTF-8') | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.