Tuesday 11 February 2020

Introducing iSaiLog on iPad

Hi everyone,
Another technical post!

In the preceding post we described SaiLog which presents NMEA-2000 data on Mac OSX, Windows and Linux.  Data is relayed via our TechoSmart Replicator.

We now have a simplified version running on our iPads.  It displays the data in the same way but lacks the Deck Log function.

iSaiLog running!
We created the app using the iOS app Pythonista.  The app is excellent value.  It was pretty easy to adapt our SaiLog python script to run on iOS.  The main changes were adapting from Mac/Windows tkinter to iOS UI.  SaiLog's WiFi socket and NMEA data processing just copied across!  And we didn't need to worry about Apple's app qualification process since iSaiLog operates entirely inside Pythonista.

Pythonista provides a User Interface design tool which we used to create iSaiLog's UI.  The UI is saved as a .pyui file which is in JSON format.  Here's a screenshot of the UI designer...

Pythonista User Interface (UI) design tool

For the non-UI part of iSaiLog we used Pythonista's built-in editor.  Files can be local to the iOS device or on iCloud - we chose the latter.  Here's a view of the editor screen 'swiped aside' to see the file selection view...

Pythonista file selection includes iCloud
Non-python files can also be edited.  The example below is the iSaiLog.ini file in which user preferences are set...


Editing iSaiLog.ini intialisation file
Pythonista has a active user forum.  There are also open-source Pythonista scripts, mainly on Github.

Running a script is simple.  We setup iSaiLog to present both a console tab and a UI tab on screen.  Here's the console tab after running iSaiLog...

Console window after running iSaiLog
And here's the UI tab while running.  Data is updated every second.  In contrast to the colour scheme shown in the top picture that below is inheriting colours from Pythonista's current colours...


iSaiLog running with Scheme=system
Next a further shrunk version for iPhone!

No comments:

Post a Comment