Feature/refactor datetime os dependency (#63)

* remove dependency on OS for time functions.

* add datetime epoch to and from seconds (yikes! 64-bit!). Add symmetric midnight seconds for unit test. Add unit tests.

* clean up BACnet date time warnings

* fix BACnet datetime warnings

Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
Steve Karg
2020-04-04 11:23:26 -05:00
committed by GitHub
parent b159402647
commit 0ce6368b43
7 changed files with 142 additions and 108 deletions
-5
View File
@@ -98,13 +98,8 @@ static void Devices_Init(uint32_t first_object_instance)
/* Now initialize the remote Device objects. */
for (i = 1; i < MAX_NUM_DEVICES; i++) {
#ifdef _MSC_VER
_snprintf(nameText, MAX_DEV_NAME_LEN, "%s %d", DEV_NAME_BASE, i + 1);
_snprintf(descText, MAX_DEV_DESC_LEN, "%s %d", DEV_DESCR_REMOTE, i);
#else
snprintf(nameText, MAX_DEV_NAME_LEN, "%s %d", DEV_NAME_BASE, i + 1);
snprintf(descText, MAX_DEV_DESC_LEN, "%s %d", DEV_DESCR_REMOTE, i);
#endif
characterstring_init_ansi(&name_string, nameText);
Add_Routed_Device((first_object_instance + i), &name_string, descText);