From 51d1cee3d70bac68e7bc735569e92bc584267f73 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 15 Nov 2023 10:22:01 +1100 Subject: Set up ldoc and lua-language-server, write some module stubs --- src/lua/stubs/power.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/lua/stubs/power.lua (limited to 'src/lua/stubs/power.lua') diff --git a/src/lua/stubs/power.lua b/src/lua/stubs/power.lua new file mode 100644 index 00000000..30fe7520 --- /dev/null +++ b/src/lua/stubs/power.lua @@ -0,0 +1,18 @@ +--- Properties and functions that deal with the device's battery and power state +-- @module power + +local power = {} + +--- battery_pct returns the battery's current charge as a percentage +-- @treturn types.Property an integer property, from 0 to 100 +function power.battery_pct() end + +--- battery_millivolts returns the battery's current voltage in millivolts +-- @treturn types.Property an integer property, typically from about 3000 to about 4200. +function power.battery_millivolts() end + +--- plugged_in returns whether or not the device is currently receiving external power +-- @treturn types.Property a boolean property +function power.plugged_in() end + +return power \ No newline at end of file -- cgit v1.2.3