updated element asserts for power indicator and incremented graphics version

This commit is contained in:
Mikayla Fischler 2024-07-27 16:23:37 -04:00
parent de6d8a89ca
commit e750ffe69d
2 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@ local flasher = require("graphics.flasher")
local core = {}
core.version = "2.3.0"
core.version = "2.3.1"
core.flasher = flasher
core.events = events

View File

@ -24,8 +24,9 @@ local element = require("graphics.element")
---@param args power_indicator_args
---@return graphics_element element, element_id id
local function power(args)
element.assert(type(args.value) == "number", "value is a required field")
element.assert(type(args.label) == "string", "label is a required field")
element.assert(type(args.unit) == "string", "unit is a required field")
element.assert(type(args.value) == "number", "value is a required field")
element.assert(util.is_int(args.width), "width is a required field")
args.height = 1