Feature/raspberry pi blinkt color objects (#503)
* fixed BACnetXYcolor and BACnetColorCommand encode and decoding and improved unit test coverage. Refactored BACnetXYcolor to/from ascii into lighting module. * added to the color, color temperature, and lighting output objects a fade/ramp/step engine. Added color and color command coercion into the channel object and enabled color temperature object coercion. Added CreateObject and DeleteObject service handling to the color, color temperature, lighting output, and channel objects. * added blinkt demo app for Raspberry Pi [WIP] * updated gitignore to simplify handling of apps folder contents * fixed piface demo build * added RaspiOS to pipeline for piface and blinkt! demo builds * added device object timer function for child object types into example Device object. Refactored device object to increment database revision for create or delete object services. Refactored example app/server to use mstimer library and device child object timers. --------- Co-authored-by: Steve Karg <skarg@users.sourceforge.net>
This commit is contained in:
@@ -990,9 +990,9 @@ uint32_t bacfile_create(uint32_t object_instance)
|
||||
return BACNET_MAX_INSTANCE;
|
||||
} else if (object_instance == BACNET_MAX_INSTANCE) {
|
||||
/* wildcard instance */
|
||||
/* the Object_Identifier property of the newly created object
|
||||
shall be initialized to a value that is unique within the
|
||||
responding BACnet-user device. The method used to generate
|
||||
/* the Object_Identifier property of the newly created object
|
||||
shall be initialized to a value that is unique within the
|
||||
responding BACnet-user device. The method used to generate
|
||||
the object identifier is a local matter.*/
|
||||
object_instance = Keylist_Next_Empty_Key(Object_List, 1);
|
||||
}
|
||||
@@ -1010,9 +1010,7 @@ uint32_t bacfile_create(uint32_t object_instance)
|
||||
pObject->File_Access_Stream = true;
|
||||
/* add to list */
|
||||
index = Keylist_Data_Add(Object_List, object_instance, pObject);
|
||||
if (index >= 0) {
|
||||
Device_Inc_Database_Revision();
|
||||
} else {
|
||||
if (index < 0) {
|
||||
free(pObject);
|
||||
return BACNET_MAX_INSTANCE;
|
||||
}
|
||||
@@ -1038,7 +1036,6 @@ bool bacfile_delete(uint32_t object_instance)
|
||||
if (pObject) {
|
||||
free(pObject);
|
||||
status = true;
|
||||
Device_Inc_Database_Revision();
|
||||
}
|
||||
|
||||
return status;
|
||||
@@ -1056,7 +1053,6 @@ void bacfile_cleanup(void)
|
||||
pObject = Keylist_Data_Pop(Object_List);
|
||||
if (pObject) {
|
||||
free(pObject);
|
||||
Device_Inc_Database_Revision();
|
||||
}
|
||||
} while (pObject);
|
||||
Keylist_Delete(Object_List);
|
||||
|
||||
Reference in New Issue
Block a user