Skip to content

About

An app (Pak) for moving model trains equipped with HM7000 chip, using a TrimUI Brick handheld console with NextUI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

TrainModelControl7000 NextUI Pak

An app (Pak) for moving model trains equipped with HM7000 chip, using a TrimUI Brick handheld console with NextUI. You can also toggle the lights on the locomotive.

Example

Installation

Download TrainModelControl7000.pak.zip from the Releases, and unarchive it. You'll see the TrainModelControl7000.pak folder, with files (no folders) inside. Copy the folder into the Tools/tg5040 folder on your TrimUI Brick's microSD card.

Usage

The installed Pak is available in Tools as TrainModelControl7000. Make sure Bluetooth is on.

  • A: faster. Available speeds are 0, 5%, 20%, 40%, 70%, and 100%. The app starts with 0 speed.
  • B: slower.
  • X: stop and prepare to reverse. Next movement command will be in the opposite direction. Press again if you wish to resume movement in the same direction as before the stop.
  • Y: toggle lights. The app starts with lights on.
  • D-pad: select train, if multiple enabled. Switching trains may take a few moments. The previously selected train will keep its speed.
  • Start: open/close settings. You can enable up to 3 locomotives, each with the configurable Bluetooth MAC address for its HM7000 chip and a selection of icons.
  • Menu or Select: quit. The app disconnects first, that may take a few moments. Trains that were running will keep running after the app quits.

Development

Requirements on Linux x86_64:

  • Kotlin Native, with its bin directory added to PATH
  • TrimUI tg5040 SDK, with TRIMUI_SDK_ROOT set to its folder path

Build

./build.sh

The Pak will then be available as build/TrainModelControl7000.pak, unarchived.

Test

Run regular tests, without test-specific dependencies:

./tests/run.sh

Alternatively, if pkgconf, libgio-2.0-dev and dbus-daemon packages are installed, you can run all tests - including the ones with a simulated Bluetooth service:

./tests/run.sh --all

Install

If you have adb, and the TrimUI is connected:

adb push "build/TrainModelControl7000.pak/." "/mnt/SDCARD/Tools/tg5040/TrainModelControl7000.pak"

Alternatively, copy the build/TrainModelControl7000.pak folder into the Tools/tg5040 folder on your TrimUI Brick's microSD card.

About

An app (Pak) for moving model trains equipped with HM7000 chip, using a TrimUI Brick handheld console with NextUI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages