Giter Site home page Giter Site logo

blinkinlabs / patternpaint Goto Github PK

View Code? Open in Web Editor NEW
55.0 10.0 17.0 76.31 MB

Making beautiful light shows is as easy as drawing a picture with Pattern Paint!

Home Page: http://blinkinlabs.com/patternpaint/

License: GNU General Public License v2.0

C 0.82% C++ 91.42% QMake 2.25% Shell 3.10% NSIS 1.92% Objective-C++ 0.49%

patternpaint's Issues

Download animation from BlinkyTape

We can read memory back from the BlinkyTape, so it would be a nice trick to download an animation from a BlinkyTape for further editing.

Window doesn't resize when opening new animation

When an animation is opened that is larger than can be shown in the current window, it remains hidden until the user makes the window longer

Platform: OS X (but should affect all)

Steps to reproduce:
-Open a long animation

Detect device disconnect in Windows

QT serial doesn't seem to send a notification that the pipe has been broken in Windows; maybe we need to scan for this ourselves?

Steps to duplicate:

  1. Run PatternPaint on Windows 7
  2. Connect to tape
  3. Unplug tape

Expected behavior: BlinkyTape.c gets notification that the device is gone, disconnects
Observed behavior: BlinkyTape not given any warning, continues running as if the device did not disappear

Sample animations

Should include some sample animations, to give inspiration on how to make cool patterns.

Image compression

Should at a minimum support compression to RGB565 and RLE, in order to increase maximum image length.

Save to .h file

For advanced Arduino users, it would be nice to have a way to export .h files from PatternPaint, so they can be used in non-standard ways.

Unable to build on Linux

Having trouble building on Ubuntu: can't get the QtSerialPort library to get picked up.

Downloaded the library, did a command line install (as root). Still getting

QTSerialPort: no such file or directory

in blinkytape.h.

Where do I go to get instructions on setting up a build environment for QT4 with the proper prerequisites?

About window is ugly

Should either replace with a splash screen (not really useful) or merge with system information dialog.

Drawing over frame indicator results in hang!

Open PatternPaint and connect. While the frame indicator is moving, mouse & draw over it. After a few moments the BlinkyTape will hang. Remove USB connection and use connect/disconnect button to reconnect.

Maybe updating too fast?

Feedback when uploads fail

Currently, when a tape is unexpectedly disconnected, the uploader fails, etc, there is no feedback to the user. Add some sort of mechanism (desktop notification?) that the operation failed, so the user can respond to it.

Poll for bootloader device inserted

On slow systems running windows, it seems that it can take >4 seconds for the bootloader device to become available. That makes the one-shot method currently in use unreliable. This should be switched to a polled method that continually scans for new devices for up to N seconds (maybe 8 + 2) before giving up.

Clear animation feature

Right now, the only way to start a new animation is to draw over it with a black tool, which is kind of poor. A clear button or menu item could be useful.

Connects to BlinkyTape but doesn't show any updates

If the program is opened, connected to a BlinkyTape, then closed, sometimes a subsequent open will connect to a BlinkyTape but the BlinkyTape will not show animation frames.

This seems to be a problem with the Arduino sketch. Workaround is to unplug BlinkyTape from USB and then reinsert.

Window resize is ugly

When the main window is resized, the interface is centered in the larger window, and the animation portion doesn't change size. What should happen here? Perhaps the window should not be resizaable?

Ghost pixels / inaccurate rendering

When sending a small number of bright pixels from one end of strip to the other (draw diagonal line in PatternPaint box) lower-number pixels turn on at maybe 30% intensity following that one. Gamma / antialising error?

Crashes when the tool size is too small in release version

Steps to reproduce:

  1. Run release version on OS X
  2. Drag tool size slider to the right and then all the way left
  3. Click in the pattern window

Process: PatternPaint [1464]
Path: /Volumes/VOLUME/PatternPaint.app/Contents/MacOS/PatternPaint
Identifier: com.yourcompany.PatternPaint
Version: ???
Code Type: X86-64 (Native)
Parent Process: launchd [286]
User ID: 501

Date/Time: 2013-10-16 11:21:08.759 +0800
OS Version: Mac OS X 10.8.4 (12E55)
Report Version: 10

Interval Since Last Report: 9875 sec
Crashes Since Last Report: 1
Per-App Crashes Since Last Report: 1
Anonymous UUID: F14C8574-5FEF-EEFB-82FD-FEB9F1933CAA

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_ARITHMETIC (SIGFPE)
Exception Codes: EXC_I386_DIV (divide by zero)

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 QtGui 0x000000010074f367 0x1005c6000 + 1610599
1 QtGui 0x000000010074f6f2 0x1005c6000 + 1611506
2 QtGui 0x0000000100788261 QRasterPaintEngine::stroke(QVectorPath const&, QPen const&) + 305
3 QtGui 0x000000010077c218 QPaintEngineEx::draw(QVectorPath const&) + 152
4 QtGui 0x000000010077d215 QPaintEngineEx::drawEllipse(QRectF const&) + 165
5 QtGui 0x000000010079048d QRasterPaintEngine::drawEllipse(QRectF const&) + 157
6 QtGui 0x000000010077d2d0 QPaintEngineEx::drawEllipse(QRect const&) + 80
7 QtGui 0x000000010079d21b QPainter::drawEllipse(QRect const&) + 363
8 com.yourcompany.PatternPaint 0x00000001000077fb PatternEditor::mouseMoveEvent(QMouseEvent_) + 427
9 QtWidgets 0x00000001000751ad QWidget::event(QEvent_) + 669
10 QtWidgets 0x000000010003e897 QApplicationPrivate::notify_helper(QObject_, QEvent_) + 311
11 QtWidgets 0x000000010004073b QApplication::notify(QObject_, QEvent_) + 3275
12 QtCore 0x0000000100bc32be QCoreApplication::notifyInternal(QObject_, QEvent_) + 110
13 QtWidgets 0x000000010003f25d QApplicationPrivate::sendMouseEvent(QWidget_, QMouseEvent_, QWidget_, QWidget_, QWidget*, QPointer&, bool) + 1037
14 QtWidgets 0x00000001000926a7 0x100014000 + 517799
15 QtWidgets 0x00000001000913e3 0x100014000 + 512995
16 QtWidgets 0x000000010003e897 QApplicationPrivate::notify_helper(QObject
, QEvent_) + 311
17 QtWidgets 0x0000000100042119 QApplication::notify(QObject_, QEvent_) + 9897
18 QtCore 0x0000000100bc32be QCoreApplication::notifyInternal(QObject_, QEvent_) + 110
19 QtGui 0x00000001005e592f QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent_) + 1967
20 QtGui 0x00000001005e4cdc QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) + 92
21 QtGui 0x00000001005d6f68 QWindowSystemInterface::sendWindowSystemEventsImplementation(QFlagsQEventLoop::ProcessEventsFlag) + 56
22 QtGui 0x00000001005d6ff8 QWindowSystemInterface::sendWindowSystemEvents(QFlagsQEventLoop::ProcessEventsFlag) + 24
23 libqcocoa.dylib 0x000000010161d385 0x101606000 + 95109
24 libqcocoa.dylib 0x000000010161ddcb 0x101606000 + 97739
25 com.apple.CoreFoundation 0x00007fff920f7b31 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
26 com.apple.CoreFoundation 0x00007fff920f7455 __CFRunLoopDoSources0 + 245
27 com.apple.CoreFoundation 0x00007fff9211a7f5 __CFRunLoopRun + 789
28 com.apple.CoreFoundation 0x00007fff9211a0e2 CFRunLoopRunSpecific + 290
29 com.apple.HIToolbox 0x00007fff95fd0eb4 RunCurrentEventLoopInMode + 209
30 com.apple.HIToolbox 0x00007fff95fd0b94 ReceiveNextEventCommon + 166
31 com.apple.HIToolbox 0x00007fff95fd0ae3 BlockUntilNextEventMatchingListInMode + 62
32 com.apple.AppKit 0x00007fff96aa7533 _DPSNextEvent + 685
33 com.apple.AppKit 0x00007fff96aa6df2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
34 com.apple.AppKit 0x00007fff96a9e1a3 -[NSApplication run] + 517
35 libqcocoa.dylib 0x000000010161c98b 0x101606000 + 92555
36 QtCore 0x0000000100bc0753 QEventLoop::exec(QFlagsQEventLoop::ProcessEventsFlag) + 403
37 QtCore 0x0000000100bc3845 QCoreApplication::exec() + 357
38 com.yourcompany.PatternPaint 0x0000000100003dad main + 61
39 com.yourcompany.PatternPaint 0x0000000100003d64 start + 52

Better paint tools

The current paint tool is basic and sort of obnoxious. Nicer ones such as a line tool, stamp, gradients, etc, would be great additions.

Undo/Redo in editor

Should be possible to brute force at least, QT has QUndoStack that could work.

QT libs location misleading

The QT library location shown in the system diagnostics page appears to be set at compile time, so it doesn't provide relevant information to the user. It should be removed.

Make height configurable

Hi,

I am experimenting with PatternPaint on linux for another project using a 30 LEDs/meter strip. (BTW the code compiles fine with qmake -qt=5 && make from command line, only some warnings).

I hacked the code to generate animation for HEIGHT 30, here is a rough patch in case anyone wants to use it:

diff --git a/src/PatternPaint/animationeditor.cpp b/src/PatternPaint/animationeditor.cpp
index ae3be23..80ff9b3 100644
--- a/src/PatternPaint/animationeditor.cpp
+++ b/src/PatternPaint/animationeditor.cpp
@@ -5,7 +5,7 @@
 #include <QtWidgets>

 // TODO: Change this when we connect to a tape, etc?
-#define BLINKYTAPE_STRIP_HEIGHT 60
+#define BLINKYTAPE_STRIP_HEIGHT 30

 AnimationEditor::AnimationEditor(QWidget *parent) :
     QWidget(parent)
diff --git a/src/PatternPaint/blinkytape.h b/src/PatternPaint/blinkytape.h
index be4faf5..3ac5b3f 100644
--- a/src/PatternPaint/blinkytape.h
+++ b/src/PatternPaint/blinkytape.h
@@ -28,7 +28,7 @@ public:
     static QList<QSerialPortInfo> findBlinkyTapes();
     static QList<QSerialPortInfo> findBlinkyTapeBootloaders();

-    BlinkyTape(QObject *parent = 0, int ledCount = 60);
+    BlinkyTape(QObject *parent = 0, int ledCount = 30);

     // TODO: Destructor!

diff --git a/src/PatternPaint/mainwindow.cpp b/src/PatternPaint/mainwindow.cpp
index 93c8a22..eb3302c 100644
--- a/src/PatternPaint/mainwindow.cpp
+++ b/src/PatternPaint/mainwindow.cpp
@@ -16,7 +16,7 @@
 #include "ColorSwirl_Sketch.h"

 // TODO: Change this when we connect to a tape, etc?
-#define BLINKYTAPE_STRIP_HEIGHT 60
+#define BLINKYTAPE_STRIP_HEIGHT 30
 #define DEFAULT_ANIMATION_LENGTH 60

 MainWindow::MainWindow(QWidget *parent) :

I have no immediate plans for a proper implementation, sorry.

Ciao,
Antonio

Upload stuck at 0%

Sometimes an upload will get stuck at 0%. This is a timing issue caused by the BlinkyTape not resetting in time; it should be fixed in PatternPaint by allowing PatternPaint to search for a new device for multiple seconds rather than once. Workaround is to disconnect from BlinkyTape in PatternPaint, uplug BlinkyTape from USB, then reinsert. Sometimes PatternPaint also needs to be restarted.

A specific .jpg file won't open in OS X

Attempting to open this file doesn't work in OS X. Unsure if other platforms are affected.

PatternPaint version: Release 0.2.0
System affected: OX X 10.9
Steps to reproduce: File->Load File, select image

Expected response: Animation is loaded in PatternPaint
Observed response: File isn't loaded, and no prompt is returned to the user. Running in debug mode give the following message:
debug MainWindow::on_actionLoad_File_triggered: Error loading animation file "/Users/mattmets/Desktop/testImages/ingtekL.jpg"

ingtekl

Remember animation load/save locations, give sane defaults?

When animation open or close are selected, they default to some unhelpful directory. They should default to somewhere sane (platform image/media directory?), and remember their last location for at least the duration of the program running.

Platforms affected: Windows, OS X, Linux

Improve RLE compression for animations with many single colors

By lowering the color space to RGB555, the first bit could be used as a flag to say whether it is a single color, or a run of colors- that way the worst case would be as good as an RGB565 image with random data, and the best case would be as good as RGB565+RLE:

single case: 0RRRRRGG GGGBBBBB
run case: 1xxxxxxx 0RRRRRGG GGGBBBBB

where RRRRR, GGGGG, BBBBB are 5-bit color encodings, and xxxxxxx is the run length.

Scroll bar for long animations

Opening a long animation causes it to go off-screen, without indicating to the user that the window should be resized. A scroll bar should be added to allow the user to scroll along the animation, and to indicate that there is more to see.

Light painting mode

As suggested by teaelixer on the forums:
http://forums.blinkinlabs.com/index.php?p=/discussion/120/blinky-tape-with-8-bit-graphics

I am happy to be able to make these pictures, but it would be "cherry on top" if there was a timer display or how long the animation will take and a hotkey starter button (any dedicated key on the keyboard) that will start/end the animation. Holding down the button will allow it to loop animation until release.

Lastly, I would love to take this to the next level with making a series of pictures into an animation. At the moment I haven't found an efficient way to paint yet...

Drag/drop support for pictures

Would be great to be able to drag a photo file from the file manager directly into the program, instead of having to navigate to it using file open.

App Nap on OS X 10.9 suspends PatternPaint

When running PatternPaint in the background on a machine running 10.9, the pattern eventually stops updating, and the BT reverts to playing it's built-in pattern. This appears to be related to PatternPaint being suspended. Likewise, when a really long pattern is played and the screen is not updated, a similar behavior seems to happen.

PatternPaint version: 0.2.0
Operating system: OS X 10.9
Steps to reproduce: Load long pattern, connect to tape, minimize PatternPaint
Observed behavior: described above
Expected behavior: pattern runs continuously

Windows: bottom rows of the LED matrix are not displayed

Description: The bottom few rows of the animation are not displayed in windows, and it's not possible to resize the window to show them
Platform affected: Windows 7, probably Linux too
Steps to reproduce: Install and run PatternPaint 0.1.0, run.

This is likely because the window sizing is fixed, and was set in OS X where there isn't a menu bar. It's likely to be similar in Linux as well.

screen shot 2013-12-04 at 16 39 56

No error message when animation too big to upload

When upload fails because the image is too big, the 'saving animation' dialog pop up, then nothing happens (animation playback continues in the background.

There should be a more informative output that explains what happened, shows how much free memory is available, and gives some tips on what to do.

Windows: animation save to file fails

Attempting to save the image file fails; it appears the extension is not handled correctly.

Steps to reproduce:

  • Run PatternPaint on Windows (any version?
  • Select 'save animation'
  • Type in a file name without extension

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.