AmendHub

cyberslak

/

lightsout

/

amendments

Amendments on March 17, 2025

code cleanup

cyberslak made amendment 23 23 days ago

Amendments on March 15, 2025

Add LICENSE information

cyberslak made amendment 22 26 days ago

remove unused channel code

cyberslak made amendment 21 26 days ago

Amendments on March 14, 2025

Add README

cyberslak made amendment 20 26 days ago

Amendments on March 13, 2025

Work around HA brightness range quirks

Some lights in HA have a brightness range of 1-255, and some of 1-254 (notably Zigbee lights), without any way of distinguishing the two. To handle both, we internally use the 1-255 range (0 = off) and map 254 to 255 when requesting the entity state. This means we may show 99.6% brightness as 100%, but that is far better than showing it as 99% and being unable to set a light to 100%.
cyberslak made amendment 19 27 days ago

Amendments on March 12, 2025

slider cleanup, add room for drag ctl, fix valueDelta bug

This fixes two annoying issues: the drag control disappearing below ~15%, as well as the inability to fully turn off a light due to precision loss while calculating valueDelta (leaving the light at, say, 1%).
cyberslak made amendment 18 28 days ago

code cleanup, move memory_init to util

cyberslak made amendment 17 28 days ago

Amendments on March 11, 2025

Allow selecting and removing entities

cyberslak made amendment 16 29 days ago

Amendments on March 10, 2025

main: fix up menu item name

cyberslak made amendment 15 about 1 month ago

main: update the bar data before showing the main window

cyberslak made amendment 14 about 1 month ago

main: add scroll support to main window and clean up entity access patterns

Because we now also have a scrollbar control, our control handling needs to be more sophisticated than simply iterating over all controls in a window. We now generally use list_foreach to iterate over entities. Additionally, we store some more info in reference constants (window_info and control_type).
cyberslak made amendment 13 about 1 month ago

Amendments on March 9, 2025

main: smorgasbord of changes

- Add preferences support
- Add support for adding entities (Cmd-A)
- Load saved entities
- Handle update/activate/suspend/resume events better
- Port handling tweaks
cyberslak made amendment 12 about 1 month ago

LightsOut.r: add various resources

cyberslak made amendment 11 about 1 month ago

entity_ldef: add

Custom entity LDEF which simply shows the name of an entity.
cyberslak made amendment 10 about 1 month ago

dbuf: tweak va_copy stuff

cyberslak made amendment 9 about 1 month ago

GenerateR: add

This is a little MPW script that generates the Rez file from a rsrc file. Can be run under ToolServer in CodeWarrior.
cyberslak made amendment 8 about 1 month ago

ha: make functions fallible, use preferences, add ha_get_entities

cyberslak made amendment 7 about 1 month ago

list: add list_foreach and list_init

cyberslak made amendment 6 about 1 month ago

net: make most functions return an error code, add connection timeouts

cyberslak made amendment 5 about 1 month ago