Skip to content

Conversation

@Archomeda
Copy link

After posting this message on reddit, I thought "why not make this happen?". And so therefore this PR. I wanted to do this a long time ago, but I went on to do other things in the mean time.

Basically, this PR adds a checkbox in the device tab where you can disable the power LED state if you don't want that blue LED messing with the lights on your wall. It's a more complicated version than what's already done previously by other people (just calling CLR(USBLED) in the firmware explicitly when it's loading). Myself, I just didn't want to fully disable it in the firmware, but make it toggleable instead.

In order to support this feature, I had to modify the firmware a bit. Right now, it supports this feature by adding a separate version number that's only read by this version of Prismatik. In case the custom firmware is used in combination with the official Prismatik, it will just act like the official firmware. In case it's the other way around, the unofficial Prismatik will just ignore the additional features from the custom firmware as they don't exist in the official firmware. You can extend this by adding more commands if needed.

I've also compiled the new firmwares and committed them (a better solution is to have it built automatically and have it uploaded in the releases, but that's your call). The new version is x.6+1, where x is the hardware version. Official versions of Prismatik still recognize the firmware as x.6.

This also updates the firmware with additional support for unofficial
commands (so we can easily distinguish the official and unofficial
firmware and features in Prismatik and make them both compatible).
The new firmware version is (4-7).6+1. Official Prismatik releases still
recognize the firmware as (4-7).6.
make LIGHTPACK_HW=x doesn't like being run multiple times in a row for
different versions without cleaning the obj folder
ReportData_u8[INDEX_FW_VER_MAJOR] = VERSION_OF_FIRMWARE_MAJOR;
ReportData_u8[INDEX_FW_VER_MINOR] = VERSION_OF_FIRMWARE_MINOR;
ReportData_u8[INDEX_FW_VER_UNOFFICIAL] = VERSION_OF_FIRMWARE_UNOFFICIAL;
return true;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't test this - all bytes in ReportData_u8 are zero unless set here?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, before this function is called the whole array is set to zero.
Also, the array is 64 bytes long, so there can't be a buffer overrun.

@psieg psieg mentioned this pull request Apr 23, 2016
@psieg
Copy link
Owner

psieg commented Apr 26, 2016

hey @Archomeda I'd really like to merge this, can you help me?

@psieg
Copy link
Owner

psieg commented Jun 3, 2016

@psieg-jenkins test this please

@psieg psieg mentioned this pull request Jun 4, 2016
@psieg psieg merged commit bd866f8 into psieg:master Jun 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants