65 Commits

Author SHA1 Message Date
5979eddc21 Setup project with SMX linked. 2023-06-16 18:51:30 -05:00
Glenn Maynard
19b27cd333 Fix crash formatting error messages on non-English systems, because vssprintf was returning -1. 2020-04-03 02:17:33 -05:00
Glenn Maynard
36b006028a Make SMXPanelAnimation stop temporarily if lights are set in another way.
This is a simple way of making it so things like the "light panels" button don't fight
with animations.
2020-03-29 23:36:27 -05:00
Glenn Maynard
96598ef59b Reset the floor color on factory reset. 2020-03-18 21:13:55 -05:00
Glenn Maynard
102fe2f9f9 Make the platform lights slider update directly when dragged, so we can delay config updates.
This is just a safeguard to prevent hammering the EEPROM erase cycles.  It also
makes the platform slider update more smoothly (previously it would only update
at a few FPS since it was using config changes).
2019-10-03 20:27:37 -05:00
Glenn Maynard
baf9b47fe9 Add an internal API to assign serial numbers. 2019-09-17 23:40:47 -05:00
Glenn Maynard
67a1789ea2 Update SDK documentation for SMX_SetLights2. 2019-07-18 20:41:12 -05:00
Glenn Maynard
672541015f Add SMX_SetOnlySendLightsOnChange for smx-panel-test. 2019-07-18 20:25:47 -05:00
Glenn Maynard
69b2239922 Refactor SMXManager::SendLightUpdates to queue multiple lights commands if possible.
This also fixes a memory leak if lights are queued too quickly.
2019-07-18 20:25:47 -05:00
Glenn Maynard
c53c3d45c6 Make sure we don't send lights commands before we have a config packet, and adjust the V3 command timing. 2019-07-18 20:25:47 -05:00
Glenn Maynard
27be716768 Add disabled combined thresholds. 2019-07-18 20:25:47 -05:00
Glenn Maynard
9facc93548 8-bit FSR thresholds. 2019-04-23 21:17:49 -05:00
Glenn Maynard
b1f675c56c Add config packet backwards-compatibility. 2019-04-18 19:20:03 -05:00
Glenn Maynard
4c07c5572e Add some default values for SMXConfig. 2019-04-17 20:36:45 -05:00
Glenn Maynard
6cc979b1dc Implement the V5 config packet. 2019-04-16 22:23:22 -05:00
Glenn Maynard
c4eb3a548c Log when we don't see data from a panel. 2019-03-31 18:02:19 -05:00
Glenn Maynard
f858e25434 Reenable bbadSensorInput (unintentionally disabled while testing). 2019-03-31 18:01:37 -05:00
Glenn Maynard
1b01f53796 Add an option to enable or disable lighting on panels with no sensors. 2019-03-21 16:00:36 -05:00
Glenn Maynard
f35f596cee Update the config block with new fields. 2019-03-20 15:13:33 -05:00
Glenn Maynard
5556d4fd65 Fix bad Color::operator== causing GIF frames to be merged incorrectly. 2019-02-26 18:03:11 -06:00
Glenn Maynard
af82a1e423 Remove the reset command on startup (just causes flicker). 2019-02-08 20:56:02 -06:00
Glenn Maynard
ec061d4223 Refactor uploading animations to allow uploading automatically instead of having a separate upload button, and iron out some inconsistencies. 2019-02-08 20:52:01 -06:00
Glenn Maynard
d38307d3bc Fix GIF loop frames. 2019-02-06 20:01:13 -06:00
Glenn Maynard
ce261c1ecb Add internal support for panel test modes, and rename "test mode" to "sensor test mode" to make the distinction clearer. 2019-02-06 20:01:06 -06:00
Glenn Maynard
63e76f29cc Use opaque white instead of just opaque for the marker pixel, so transparent GIFs aren't needed when markers aren't being used. 2019-02-05 18:09:07 -06:00
Glenn Maynard
501b297c8f Rename iBadSensorDIP -> iBadJumper. 2019-02-05 16:05:48 -06:00
Glenn Maynard
bf9b8b185c Coalesce identical GIF frames on load. 2019-02-01 23:03:20 -06:00
Glenn Maynard
6d370ee092 Show a warning if an incorrect sensor DIP switch is detected. 2019-01-19 17:56:19 -06:00
Glenn Maynard
6d0820f495 Add the PlatformFlags_FSR config flag. 2019-01-19 17:38:05 -06:00
Glenn Maynard
681c7adfef Fix up calculating animation frame counts. 2019-01-18 19:46:26 -06:00
Glenn Maynard
a202063287 Truncate the config packet for firmware that doesn't need all of it. 2019-01-18 19:46:26 -06:00
Glenn Maynard
cc07e07649 Fix auto-lighting not reactivating quickly. 2019-01-18 19:46:19 -06:00
Glenn Maynard
9167c9e0ed Use GetOverlappedResult instead of GetOverlappedResultEx for Windows 7. 2019-01-18 19:46:19 -06:00
Glenn Maynard
88052ee318 Updates to graphic upload handling. 2019-01-18 19:46:10 -06:00
Glenn Maynard
849fd7a975 Simplify overlapped I/O handling, and add a command timeout.
If we don't get a response from a command in a while, resend it.  This doesn't
normally happen (it only happened during firmware development), but it makes
command sending more robust, so let's keep it.  This also uses a single OVERLAPPED
for a whole command, which is simpler.
2019-01-03 18:13:51 -06:00
Glenn Maynard
48c75ba224 Pass the packet response to completion callbacks. 2019-01-01 18:00:27 -06:00
Glenn Maynard
879df7152c Fix m_bSendingConfig not being reset on close.
This could cause us to stop sending config updates, since we're still
waiting for the previous one to complete.  This is probably the cause
of threshold changes, etc. not being applied.
2018-12-29 22:11:30 -06:00
Glenn Maynard
aba274603c Set LIGHTS_PER_PANEL to 25.
At 16 the lights data was overflowing, which is probably what was causing the
smxconfig crashes.
2018-12-27 18:26:02 -06:00
Glenn Maynard
1c980f24e0 Add config fields for FSR sensitivity and the platform strip color.
This also sets pack:1 so we don't rely on compiler struct alignment.
2018-12-09 16:33:40 -06:00
Glenn Maynard
3d5be3017b Add support for 25 light panels (SDK side). 2018-12-09 16:11:12 -06:00
Glenn Maynard
55443cccb8 Add SMX_SetLights2 to specify the buffer size explicitly. 2018-12-09 16:11:12 -06:00
Glenn Maynard
5e1068d565 Fix config updates when updating quickly.
This fixes the pad flickering when dragging the color slider, because it
could briefly use an out-of-date configuration (only really visible when
going between red and white on the left).
2018-12-09 16:11:12 -06:00
Glenn Maynard
f4e60ef2e0 Clarify comment. 2018-12-09 16:11:12 -06:00
Glenn Maynard
cb7feb626e Separate out scaleLight. 2018-12-09 16:11:12 -06:00
Glenn Maynard
cf02b97fe6 Rename m_aPendingCommands -> m_aPendingLightsCommands.
This only buffers lights commands, not all commands.
2018-12-09 16:11:12 -06:00
Glenn Maynard
39cfc8cee0 Add support for uploading animations to the panel, if it supports it. 2018-12-09 16:11:12 -06:00
Glenn Maynard
0b3202ccff Handle 25-light panel animations in SMXPanelAnimation. 2018-12-09 16:11:12 -06:00
Glenn Maynard
880774f9e4 Make sure we call the callback from SendCommandLocked if the device isn't connected and we're not queueing the command. 2018-12-09 16:11:12 -06:00
Glenn Maynard
4691ce5ecf If commands are buffered and not sent when the device is disconnected, call any completion callbacks.
This is to guarantee that completion callbacks are always called, so if any
resource collection happens in them it'll always happen.
2018-12-09 16:11:12 -06:00
Glenn Maynard
135e3c5401 Add a UI to set panel animations.
This is driven by the config tool, which needs to stay running.
2018-12-09 16:11:12 -06:00