Flotilla "ShipShape" Update: Dip in and try the pre-release ( NEW: Updated Python API )

#Flotilla ShipShape

Pre-release update

Flotilla “ShipShape” is edging closer to launch, so it’s time for anyone with time, patience and an adventurous spirit to dive onboard and try it out.

You can try it out by grabbing the flotilla-pre GitHub repository from here: https://github.com/pimoroni/flotilla-pre

Or, on your Pi:

git clone https://github.com/pimoroni/flotilla-pre

There are very, very, very, very experimental Windows/Mac installers available in this repository too, but we wont be properly supporting them or making an official Windows/Mac release until we’re happy with how things are shaping up on the Pi.

Flotilla “ShipShape” is a complete overhaul of the Flotilla Dock firmware, Flotilla Daemon and Flotilla Rockpool to:

  • Make it faster
  • Make it better
  • Make it stronger
  • More Than Ever Hour After
  • Our Work Is Never Over

It contains numerous bug fixes, updates and improvements including a refined UX/UI for Rockpool and your comments, suggestions and cries of encouragement are welcome!

Update as of 2016-02-09

Dock

  • Minor firmware tweak to Slider and Dial so they better hit their minimum and maximum values.
  • Firmware version now “1.11” to reflect changes.
  • Colour now reports raw values and does not attempt to mangle them

Daemon

  • Now has a version number, 1.1, which it reports to Clients
  • Docks can be “subscribed” to on a per dock basis
  • Daemon sends more information to Rockpool during discovery- including a canonical address to prevent duplication
  • Now only emits values which have changed from modules

Rockpool

  • Redesigned discovery screen now groups docks by server and warns if no docks are connected
  • Preliminary support for multiple docks, but no multi dock support
  • Bottom toolbar dropped for now, will come back in a point release when it all works!

Python API

I’ve updated the Python API to support ShipShape, along with a bunch of other fixes. You can find the ShipShape Python API here: https://github.com/pimoroni/flotilla-python/tree/shipshape

I have some interesting behaviour on this pre release; I figured I should let you know.

pi2 running on Jessie, I followed the instructions (probably missed something) and got as far as rockpool in pre

I attached a dial, gave it a twist and I could see the wave coming from it. Next I attached a rainbow and made hue the output from my dial. I gave the dial a twist and nothing happened, then I noticed the lights going crazy on the dial. I deleted this rule

I started again, this time I attached something to every port. Using my dial I attached it to the matrix graph (I think) but a motor turned on. Using one of the other matrix options I got the other motor to turn on. Gnarly!

It occasionally stops working in pre and works as expected in the old offline.

It sounds like there is a missmatch of port addressing scheme. Have you flashed the new firmware and are you using the ‘launch_flotilla’ script?

1 Like

@RogueM I did the firmware but opened flotilla-pre/raspi/rockpool/index.html rather than ‘Launch_flotilla’ I will try tonight and report back.

OK, then in that case it is using the old daemon, which is likely what the problem is.

1 Like

As @RogueM suggests, the update is very thorough and changes the Dock Firmware, Daemon and Rockpool in sync with each other. They all have to be up-to-date or the result will be… undefined!

This makes me wonder if I should include a version number in the Daemon ( I probably should! ) which is validated by Rockpool at runtime to check everything is hunky dory.

1 Like

Yup, it’s working! Thanks @RogueM

In other news the line following robot is now working, thanks for the tips and hardwork @gadgetoid

1 Like

OOOh, that’s some good news. It had never occurred to me that the response rate changes in the latest Rockpool were what made the super-simple line-following setup possible.

When I finally find the time, I’m going to set up some green/blue tape and see if I can make it switch lines on the fly.

1 Like

I may be missing something obvious here however I was looking at the code for the launch_flotilla script:

if [ "$DISPLAY" ]; then cd ./rockpool python ./rockpool.py fi

And spotted that there’s no rockpool.py in the rockpool folder… so should this get called then it’s going to fall over.

Good spot! I broke this when I did a sync from the latest version of Rockpool ShipShape, I’d deleted the whole folder. Fixed!

1 Like

We tried out the new software toady. The performance and stability is much improved over the previous version.
Hot-swapping components seems much less flakey. The new UI is really nice.

Issues we found:
When trying to use the motors with joystick control, there is still a lot of lag.
The load/save button doesn’t work
When updating inputs or outputs, the labels change but the icon stays the same (sometimes)
Can’t get rainbow or LED matrix to produce any output when used with slider or dial input or even just on/off but works fine with touchpad.

On thing that should be included- especially since updates are going to be frequent should be info on how to remove old versions. I had a heck of a time trying to get the latest update working and im not certain its working correctly.

thanks!

this is a pre-release, we specifically do NOT want to remove the old version. When it rolls out then obviously it will supersede it.

Is this running the whole setup exclusively on a Pi? B+ or Pi 2? This is one of the tests we’ve been using to benchmark overall performance, and it’s been pretty good (although far from instantaneous).

I’m not sure if Rockpool will ever be capable of giving instantaneous control, since it’s just got too many layers where things can get delayed. However on faster platforms it definitely feels much, much better (as you’d logically expect).

That’s weird regarding the Rainbow/Matrix, I wonder if I’ve broken something or made a regression I haven’t tested.

And regarding updating inputs, I’ll have to poke and pry more- I’ve been very conservative about how often those UI elements are redrawn to squeeze as much performance out of the Pi as possible, so sometimes they might not get updated when they should.

Thanks for your feedback, it’s super useful!

This is running on a Pi 2, latest Jessie. The lag is quite severe - sometimes 5 seconds or longer. Sometimes a press of the joystick just doesn’t lead to any motion at all (but lots of flashing on the dock).

This sounds quite a lot like you’ve updated to ShipShape Daemon, and Rockpool but haven’t updated the Dock firmware itself. It should cause pretty much exactly the problem you describe since updates will clobber each other and fight to get through for several seconds before anything happens.

Try updating your Dock firmware using the update script here: https://github.com/pimoroni/flotilla-pre/tree/master/raspi/dock-firmware

This should be in flotilla-pre/raspi/dock-firmware on your Pi.

I’m afraid that I did already upgrade the dock firmware at the same time as updating the daemon - at least I ran the command and got back the message ‘success “Update finished, enjoy!”’ and the end. Is there any way of checking to confirm that this did in fact work?

It struck me ( or rather it struck @RogueM and he mentioned it to me ) that the Rockpool front-end should verify you’re running 1.1 and shouldn’t show older docks at all- so I may have been barking up the wrong tree. This does sound exactly like the old dock with too fast an update rate, though, so colour me confused.

I’ll have to see if I can replicate!

how are you running the ‘pre’?

… if you use the ‘launch_flotilla’ script, then the daemon will be running in debug mode. In this mode you should be able to see the dock version. It should be 1.1 at this point as opposed to 0.1 in the firmware as shipped to you.