# HG changeset patch # User jfp <jf.pieronne@laposte.net> # Date 1719396634 -7200 # Wed Jun 26 12:10:34 2024 +0200 # Node ID cc62384de2518b9b5b6cd330df07e553c4216030 # Parent 87c1d7ed1e246361e8392557ddec1734335289dc Update label_border diff --git a/python/local/ovms_module/ovms/rtl/smg/_vmssmg.pyi b/python/local/ovms_module/ovms/rtl/smg/_vmssmg.pyi --- a/python/local/ovms_module/ovms/rtl/smg/_vmssmg.pyi +++ b/python/local/ovms_module/ovms/rtl/smg/_vmssmg.pyi @@ -412,14 +412,14 @@ def label_border( display_id: int, - text: bytes | str, + text: bytes | str | None, position_code: int | None = None, units: int | None = None, rendition_set: int | None = None, rendition_complement: int | None = None, character_set: int | None = None, ) -> int: - """status = label_border(display_id, text, position_code=None, units=None, + """status = label_border(display_id, text=None, position_code=None, units=None, rendition_set=None, rendition_complement=None, character_set=None)""" ... diff --git a/python/local/ovms_module/ovms/rtl/smg/_vmssmg.pyx b/python/local/ovms_module/ovms/rtl/smg/_vmssmg.pyx --- a/python/local/ovms_module/ovms/rtl/smg/_vmssmg.pyx +++ b/python/local/ovms_module/ovms/rtl/smg/_vmssmg.pyx @@ -757,16 +757,17 @@ #----------------------------------- # label_border #----------------------------------- -def label_border(unsigned int display_id, text, position_code=None, +def label_border(unsigned int display_id, text=None, position_code=None, units=None, rendition_set=None, rendition_complement=None, character_set=None): - "status = label_border(display_id, text, position_code=None,\ + "status = label_border(display_id, text=None, position_code=None,\ units=None, rendition_set=None,\ rendition_complement=None,\ character_set=None)" cdef dsc_descriptor_s textD text = getstr(text) - DESCFROMSTR(&textD, text) + cdef dsc_descriptor_s* textStr = \ + DESCFROMOPTSTR(&textD, text) cdef unsigned int ipc cdef unsigned int* ipcPtr = UIOPTPTR(&ipc, position_code) cdef int iunits @@ -777,7 +778,7 @@ cdef unsigned int* ircPtr = UIOPTPTR(&irc, rendition_complement) cdef unsigned int ics cdef unsigned int* icsPtr = UIOPTPTR(&ics, character_set) - s = smg_label_border(&display_id, &textD, ipcPtr, iunitsPtr, + s = smg_label_border(&display_id, textStr, ipcPtr, iunitsPtr, irsPtr, ircPtr, icsPtr) checkStatus(s) return s