Commit Graph

206 Commits

Author SHA1 Message Date
Fabian Schlenz 54925dfc0e Snake effect now uses a neural net with a hidden layer; a bug in _is_free() that lead to lots of snakes committing suicide was fixed; neural net weights are now given as binary representation of a float to prevent rounding errors. 2019-10-18 06:40:09 +02:00
Fabian Schlenz 230a1f1a91 Effect snake now uses a "proper", albeit simple neural network instead of simple decisions. 2019-10-16 12:27:58 +02:00
Fabian Schlenz bd0041619a Added snakenet.rb, the tool used to train the AI for snake effect. 2019-10-16 05:56:42 +02:00
Fabian Schlenz a3caaa1fef Merge branch 'master' of https://git.schle.nz/fabian/pitrix
continuous-integration/drone/push Build encountered an error Details
2019-10-15 20:06:38 +02:00
Fabian Schlenz ec379c009e Effect snake is now a real snake game, with apples, dying and even a more or less smart AI. 2019-10-15 20:06:19 +02:00
Fabian Schlenz 6eeb7488b1 Effect sinematrix now comes in additional variants with some more color palettes. 2019-10-12 23:27:49 +02:00
Fabian Schlenz efa9a73cae Added switching of effects via the web interface.
continuous-integration/drone/push Build encountered an error Details
2019-10-11 17:57:00 +02:00
Fabian Schlenz bbdb46c04d Twirl no longer uses a masked clock. 2019-10-11 17:56:37 +02:00
Fabian Schlenz 4c611da6d1 Finally, big_clock is working correctly with smoothly moving seconds and stuff. Also, the spacing of the moving seconds is now configurable. 2019-10-11 17:56:18 +02:00
Fabian Schlenz 377ccc477f Small changes in settings.
continuous-integration/drone/push Build encountered an error Details
2019-10-11 12:14:32 +02:00
Fabian Schlenz efebe9adb4 The *matrix effects now are all derived from MatrixEffectBase class. Also, you can now set the amount of columns for these effects. 2019-10-11 06:21:32 +02:00
Fabian Schlenz 359b7a7826 Merge branch 'master' of https://git.schle.nz/fabian/pitrix; added new effect tv_static.
continuous-integration/drone/push Build encountered an error Details
2019-10-10 06:50:09 +02:00
Fabian Schlenz b5c1f350d2 Whitespace changes.
continuous-integration/drone/push Build encountered an error Details
2019-10-10 06:47:17 +02:00
Fabian Schlenz 5eba691429 Extended the webinterface to list all available effects. 2019-10-10 06:45:49 +02:00
Fabian Schlenz 6b4f75b8bc Fixed random_matrix effect. 2019-10-10 06:43:01 +02:00
Fabian Schlenz 416ab46f9b Repaired font3x5_numbers_blocky: A 5 will now be shown as 5 instead of 9. m( 2019-10-09 05:59:05 +02:00
Fabian Schlenz b4aa711940 Lots of settings stuff: The webinterface at /settings now lets you change the settings. Also, these changes will be saved to SPIFFS and loaded after a reboot. 2019-10-09 05:57:20 +02:00
Fabian Schlenz 205a0df842 Small fixes.
continuous-integration/drone/push Build is failing Details
2019-10-04 15:58:56 +02:00
Fabian Schlenz 8bcee1871f Effect dvd now with subpixel rendering. 2019-10-04 15:58:24 +02:00
Fabian Schlenz ef57c5ea2e Settings can now be changed:
* Via HTTP POST request to /settings, providing key=<key_to_change> and value=<new_value>.
  * Via MQTT at <MQTT_TOPIC>/settings.<key>.
2019-10-04 12:11:05 +02:00
Fabian Schlenz 0f1d4abe04 Settings are now properly global and can be changed. 2019-10-04 12:10:16 +02:00
Fabian Schlenz 2b50691067 Fixed memory leak in random_matrix and rainbow_matrix. 2019-10-04 12:08:01 +02:00
Fabian Schlenz af1314632e sines effect now uses subpixel rendering. 2019-10-04 12:05:54 +02:00
Fabian Schlenz 2b7033b685 cycle effect now tracks the heap leakage of the running effects. Cause somewhere's a memory leak leading to restarts of the ESP every about 2 days... 2019-10-04 12:03:03 +02:00
Fabian Schlenz 97dd6de280 Fixes for recorder and tests. 2019-10-02 06:21:10 +02:00
Fabian Schlenz 54d357e6df Fixes for firework effect. 2019-10-02 06:20:39 +02:00
Fabian Schlenz ac1f758b87 Fixes in blur2d effect. 2019-10-02 06:18:43 +02:00
Fabian Schlenz 85aee53462 More debugging output in Animation.cpp 2019-10-02 06:18:15 +02:00
Fabian Schlenz f42b5e1034 Effect big_clock now show the seconds in a calmer way. Divisible-by-5 seconds are in another color. 2019-10-02 06:17:20 +02:00
Fabian Schlenz 083564caef Reorganized effect selection stuff: No longer a big case clause comparing CRC32. Instead an array of structs. Much nicer. Also, other code can now see which effects there are. 2019-10-02 06:16:07 +02:00
Fabian Schlenz 3f6d4cb0be Moved settings from preprocessor directives to variables. Also added a way to (for now only) display them via HTTP server. 2019-10-02 06:13:55 +02:00
Fabian Schlenz 382631d7d7 Effect#loop now gets the time since the last run of the loop in ms. This enables
the effects to show animations that stay fluid independent of the current frame rate.
2019-10-01 06:29:32 +02:00
Fabian Schlenz 096d13438a More effects for cycle.
continuous-integration/drone/push Build is passing Details
2019-09-26 06:52:33 +02:00
Fabian Schlenz 075f434997 Small fixes and tweaks to blur2d, clock and firework.
continuous-integration/drone/push Build is passing Details
2019-09-25 20:05:18 +02:00
Fabian Schlenz c1024b3423 As noticed, this reverts big_clock to the pre-subsampling state. 2019-09-25 20:04:48 +02:00
Fabian Schlenz 2395e51e88 Added different rendering modes for the subpixel stuff. 2019-09-25 20:04:17 +02:00
Fabian Schlenz 1c1c3a8054 Kinda fixed big_clock effect, but it doesn't look nearly as cool as I'd hoped... So this commit includes the fix and the next commit will be a revert to the older, non-subsampled code, which just looked better. 2019-09-25 19:31:07 +02:00
Fabian Schlenz 937850c90a Better MQTT filtering.
continuous-integration/drone/push Build is passing Details
2019-09-25 18:13:56 +02:00
Fabian Schlenz b0c1bcaa65 More logging for effect changes in cycle effect. 2019-09-25 18:13:39 +02:00
Fabian Schlenz 7cbb156b66 Attempted to make the border of big_clock use subpixel rendering. This is still work in progress. 2019-09-25 18:13:11 +02:00
Fabian Schlenz 0a7334e448 Fixed big_clock 2019-09-25 18:12:34 +02:00
Fabian Schlenz 29aa47177e Fixed dimmed colors in subpixel rendering mode. 2019-09-25 18:12:16 +02:00
Fabian Schlenz 7ac681002e Added effect night_clock 2019-09-25 18:11:52 +02:00
Fabian Schlenz 36edb94ff0 Metrics now include the current effect's name. 2019-09-25 18:11:03 +02:00
Fabian Schlenz 34d5aa6496 Use more effects for cycling through! 2019-09-25 06:42:43 +02:00
Fabian Schlenz 781954d7f1 Added effect marquee, which will scroll a given message through the display. 2019-09-25 06:41:52 +02:00
Fabian Schlenz 73b8d162c7 Metrics logging now includes average time taken per frame. Also, metrics now come in a single JSON payload to /metrics. 2019-09-25 06:40:24 +02:00
Fabian Schlenz 62549e73bf Small fix for clock effect to work correctly with the new subpixel rendeing stuff. 2019-09-25 06:35:30 +02:00
Fabian Schlenz 3018bc6375 Added font5x7 and turned the letters around so they are now upside up. ;-) 2019-09-25 06:34:26 +02:00
Fabian Schlenz 1cd94ac4ae Effect swirl is now shown with clock. 2019-09-25 06:33:26 +02:00
Fabian Schlenz b8f39410c9 Effect matrix now uses subpixel rendering for smoother movements. 2019-09-25 06:32:35 +02:00
Fabian Schlenz 711719921a Rewrote effect firework. Now it kinda works. 2019-09-25 06:30:03 +02:00
Fabian Schlenz 6ba2854a8d Effect big_dynamic will now be shown with clock. 2019-09-25 06:28:53 +02:00
Fabian Schlenz aa11f5ed8a Added subpixel-rendering as well as blurring methods to Window. 2019-09-25 06:27:43 +02:00
Fabian Schlenz fa5f1c8816 Added effect blur2d 2019-09-25 06:26:27 +02:00
Fabian Schlenz b5c99c320b Added effect sines. 2019-09-25 06:25:16 +02:00
Fabian Schlenz 96e144f96b Added effect analog_clock (heavily, not-really-usable work-in-progress!). 2019-09-25 06:24:24 +02:00
Fabian Schlenz 792354e371 Updated recorder to only send every 2nd frame, to clear the window when selecting a new effect, doubled the resizing factor and re-enabled gifsicle. 2019-09-25 06:09:00 +02:00
Fabian Schlenz 549bce479a gifsicle breaks the gifs. -_-
continuous-integration/drone/push Build is passing Details
2019-09-04 12:48:45 +02:00
Fabian Schlenz 1754f49b68 Better results from memory leak effect.
continuous-integration/drone/push Build is passing Details
2019-09-04 06:07:28 +02:00
Fabian Schlenz 0b80b74be3 Added more effects to the cycle effect. 2019-09-04 06:06:47 +02:00
Fabian Schlenz 33c2417534 Added recorder to be able to stream the current LED data via network. That way you can create nice looking GIF images of the effects - and even develop effects without having to look at the actual LED panel. 2019-09-04 06:05:45 +02:00
Fabian Schlenz bf1666fb32 Added font numbers3x5_blocky. 2019-09-04 06:02:16 +02:00
Fabian Schlenz a05931d7f9 Made twirl effect a lot more beautiful. 2019-09-04 06:01:08 +02:00
Fabian Schlenz a6cd94e416 Fixed rainbow_matrix and random_matrix. 2019-09-04 06:00:18 +02:00
Fabian Schlenz 2ddd77eb5c Fixed big_clock effect and made it a lot nicer with moving pixels for seconds. 2019-09-04 05:59:30 +02:00
Fabian Schlenz 1122546853 Fixed line and circle drawing code in Window. But it looks bad ans some form of dithering is definitely required. 2019-09-04 05:58:36 +02:00
Fabian Schlenz 77fdba213a I'm tired and forgot to add two files to previous commits. :-/ 2019-06-19 22:29:11 +02:00
Fabian Schlenz ead076f9a3 You can now set options for effects via MQTT and HTTP. Basic syntax is: <mode>,<option1>=<value1>,<option2>=<value2>,... 2019-06-19 22:28:38 +02:00
Fabian Schlenz 82fbc7be43 MQTT: Small fixes. Most notably, MQTT_TOPIC/status will now contain hostname and IP of pitrix. 2019-06-19 22:27:33 +02:00
Fabian Schlenz 90c0df093e New Effect: BigDynamicEffect. 2019-06-19 22:26:52 +02:00
Fabian Schlenz 26df11fc47 Added tests. Start them by sending a message to MQTT_TOPIC/run_tests. First test will test all effects for memory leaks. 2019-06-19 22:26:38 +02:00
Fabian Schlenz 0163bbef6c Some memory leaks fixed. 2019-06-19 22:23:49 +02:00
Fabian Schlenz d2c0268dce MatrixEffect can now have multiple columns in the same column. In RandomMatrix, they even run in all directions. 2019-06-19 22:22:03 +02:00
Fabian Schlenz e897c6bdcd New Effect: DvdEffect 2019-06-19 22:17:39 +02:00
Fabian Schlenz f1821b0b85 New Effect: RandomConfettiEffect 2019-06-19 22:17:10 +02:00
Fabian Schlenz 41af01ee0b Better handling of Animations, their members and the destructor. 2019-06-19 22:16:06 +02:00
Fabian Schlenz 74b967392d Cleanup.
continuous-integration/drone/push Build is failing Details
2019-06-18 18:18:07 +02:00
Fabian Schlenz 8c9e9e2e2e MQTT: Use new effect structure and logging. 2019-06-18 18:17:48 +02:00
Fabian Schlenz f1424d0277 Extended http server to list files in SPIFFS and allow you to upload and delete files. 2019-06-18 18:17:20 +02:00
Fabian Schlenz 0941ad8349 Effects are now constructed when needed instead of having global objects of every effect flying around. 2019-06-18 18:14:59 +02:00
Fabian Schlenz ae02509712 Updated .gitignore 2019-06-18 18:12:16 +02:00
Fabian Schlenz 3c0e7a116a Animation now uses .pia files from SPIFFS instead of hardcoded C stuff. 2019-06-18 18:10:58 +02:00
Fabian Schlenz 1912772da3 Effects now use Constructor and Destructor to initialize or delete their data, instead of using start() and stop(). 2019-06-18 18:09:05 +02:00
Fabian Schlenz f0509de411 PixelClockEffect is now being displayed correctly. 2019-06-16 12:43:34 +02:00
Fabian Schlenz e8f3ea3281 Extended MatrixEffect to also get RainbowMatrixEffect and RandomMatrixEffect.
Side note: You know you understand C++ when you understand the meaning 
and reason for "MatrixEffect** _columns". ;-)
2019-06-16 12:43:05 +02:00
Fabian Schlenz 3edbf6b252 Added PicelClockEffect.
continuous-integration/drone/push Build is passing Details
2019-06-15 14:18:35 +02:00
Fabian Schlenz b65afde142 MatrixEffect now uses dynamically allocated memory. 2019-06-15 14:17:06 +02:00
Fabian Schlenz 02b3bbcea8 Added methods for drawing lines and circles to Window. 2019-06-15 14:16:27 +02:00
Fabian Schlenz 0af76f2195 gif2c: Produce nicer formatted C code.
continuous-integration/drone/push Build is failing Details
2019-06-14 05:36:25 +02:00
Fabian Schlenz 5ce3b0c1b3 Centralized the creation of a hostname to a global variable hostname, set in pitrix.cpp. Added an mDNS record for the webserver. 2019-06-14 05:35:17 +02:00
Fabian Schlenz 4fdd1d3739 Added animation 'cake'. 2019-06-14 05:32:55 +02:00
Fabian Schlenz 1e23936374 Added effect 'gol': Conway's Game of Life. 2019-06-14 05:32:17 +02:00
Fabian Schlenz 291a3be623 Moved platform-specific code related to WiFi and services to my_wifi.h. Also, made the HTTP server stuff compatible to ESP32.
continuous-integration/drone/push Build is passing Details
2019-06-13 06:01:44 +02:00
Fabian Schlenz bfe46220ca Added HTTP REST API. 2019-06-12 20:57:31 +02:00
Fabian Schlenz 308196d185 Added fps to MQTT metrics. 2019-06-12 20:49:37 +02:00
Fabian Schlenz ca980b0c9f You can now set LED_MAX_MILLIAMPS if your power supply is limited. 2019-06-12 20:48:56 +02:00
Fabian Schlenz 874b2c212f Small changes to some effects:
continuous-integration/drone/push Build is passing Details
* Don't put multi-dynamic and single-dynamic right after one another, 
because that looks strange when not using random cycling between 
effects.
* Removed white from the matrix palette cause we're setting white 
explicitly from the code.
* Increased speed of single_dynamic a little.
2019-06-12 06:32:06 +02:00
Fabian Schlenz 477edd1597 I just learned that unintialized variables in C can lead to lots of unexpected and hard-to-debug behaviour... :-/ 2019-06-12 06:30:26 +02:00
Fabian Schlenz 2072877159 Handling of incoming MQTT messages improved.
continuous-integration/drone/push Build is passing Details
2019-06-11 19:48:42 +02:00