Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions Gaming/TrainingPeaks-Virtual/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
![icon_small.png](icon_small.png)


# Training Peaks Virtual Companion
A simple remote with all common in game actions for Training Peaks Virtual cycling training app.

## Features
* Turn Left
* Turn Right
* U Turn
* Up and Down
* Return/Enter
* Increase/Decrease Resistance
* Take a Screenshot
* Toggle Hud, Nearby Riders, Route Profile, Action Menu, Power/HR/Cadence Graphs, ERG Mode, and Workout Details.
* Brake/slow down
* Take a break
* Increase/Decrease workout intensity by 1%
* Skip to next/previous interval
* Pause/Resume workout

## Installation
1. Download TrainingPeaksVirtual folder from the repository.
2. Copy the folder including all its contents to:
* Windows:
C:\ProgramData\Unified Remote\Remotes\Bundled\Unified\Examples
* Mac:
~/Library/Application Support/Unified Remote/Remotes/Bundled/Unified/Examples
3. Open Unified server on your computer.
4. In status/dashboard screen, click on the "reload remotes" button.

#### For more information on how to create and install remotes, see [Unified Remote Documentation](https://www.unifiedremote.com/tutorials/how-to-create-a-custom-keyboard-shortcuts-remote)


## Screenshots
![screenshot.jpg](screenshot.jpg)
Binary file added Gaming/TrainingPeaks-Virtual/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Gaming/TrainingPeaks-Virtual/icon_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions Gaming/TrainingPeaks-Virtual/layout.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<layout orientation="portrait" scroll="veritcal" onvolumedown="volume_down" onvolumeup="volume_up">
<row weight="1">
<label color="blue" weight="5" text="TP Virtual Companion" />
</row>
<row color="" weight="1">
</row>
<row weight="5">
<button image="left.png" scale="fit" lightcolor="#ffffff" darkcolor="#000000" ontap="left" />
<button image="uturn.png" scale="fit" lightcolor="#ffffff" darkcolor="#000000" ontap="uturn" />
<button image="right.png" scale="fit" lightcolor="#ffffff" darkcolor="#000000" ontap="right" />
</row>
<row color="" weight="1">
</row>
<row color="" weight="3">
<button visibility="invisible" text="" />
<button text="ARROW UP" icon="arrowup" ontap="action" />
<button visibility="invisible" text="" />
</row>
<row color="" weight="3">
<button text="ARROW LEFT" icon="arrowleft" ontap="left" />
<button color="red" text="ENTER" icon="select" ontap="enter" />
<button text="ARROW RIGHT" icon="arrowright" ontap="right" />
</row>
<row color="" weight="3">
<button visibility="invisible" text="" />
<button text="ARROW DOWN" icon="arrowdown" ontap="arrowdown" />
<button visibility="invisible" text="" />
</row>
<row color="" weight="1">
</row>
<row color="" weight="3">
<button text="+" ontap="increase" />
<button text="-" ontap="decrease" />
<button text="Take a Screenshot" icon="camera" ontap="screenshot" />
</row>
<row color="" weight="3">
<button text="HUD" textalign="center" ontap="HUD" />
<button text="SLOW DOWN" textalign="center" ontap="brakes" />
<button text="TAKE A BREAK" textalign="center" ontap="takeabreak" />
</row>
<row weight="3">

<button text="NEARBY PLAYERS" textalign="center" ontap="Players_List" />
<button text="ROUTE PROFILE" textalign="center" ontap="route" />
<!-- <button text="PAIRING" textalign="center" ontap="pairing" /> -->
<button text="ACTION MENU" textalign="center" ontap="action" />
</row>
<row weight="1">
</row>
<row weight="1">
<label color="blue" weight="5" text="Workout Mode" textalign="center" />
</row>
<row weight="3">
<button text="PWR GRAPH" textalign="center" ontap="graph" />
<button text="ERG MODE" textalign="center" ontap="erg" />
<button text="WORKOUT ELEMENTS" textalign="center" ontap="workout" />
</row>
<row weight="3">
<button text="HARDER" icon="up" ontap="harder" />
<button text="EASIER" icon="down" ontap="easier" />
<button text="SKIP BACKWARDS" icon="rwd" ontap="forward" />
<button text="SKIP FORWARD" icon="ff" ontap="back" />
<button text="PAUSE WORKOUT" icon="pause" ontap="pause" />
</row>
</layout>
Binary file added Gaming/TrainingPeaks-Virtual/left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions Gaming/TrainingPeaks-Virtual/meta.prop
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
meta.name: TP Virtual
meta.author: inc21
meta.description: Companion remote for TP Virtual Cycling App
meta.tags: companion
170 changes: 170 additions & 0 deletions Gaming/TrainingPeaks-Virtual/remote.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
local kb = libs.keyboard;


-- Documentation
-- http://www.unifiedremote.com/api

-- Keyboard Library
-- http://www.unifiedremote.com/api/libs/keyboard

-- System Controls


--@help Volume Down
actions.volume_down = function ()
end


--@help Volume Up
actions.volume_up = function ()
end


-- User Remote Controls


--@help Left
actions.left = function ()
kb.press("left");
end


--@help U Turn
actions.uturn = function ()
kb.stroke("U");
end


--@help Right
actions.right = function ()
kb.press("right");
end


--@help Arrow Up
actions.arrowup = function ()
kb.press("up");
end


--@help Enter or Select
actions.enter = function ()
kb.press("return");
end


--@help Arrow Down
actions.arrowdown = function ()
kb.press("down");
end


--@help HUD
actions.HUD = function ()
kb.stroke("H");
end


--@help Players_List
actions.Players_List = function ()
kb.stroke("N");
end


--@help Slow Down
actions.brakes = function ()
kb.press("s");
end


--@help Take a Screenshot
actions.screenshot = function ()
kb.press("f10");
end


--@help Take a Break
actions.takeabreak = function ()
kb.press("b");
end


--@help Route Profile
actions.route = function ()
kb.press("p");
end


--@help Pairing Menu
actions.pairing = function ()
kb.press("a");
end


--@help Increase Trainer Resistance
actions.increase = function ()
kb.press("numadd");
end


--@help Decrease Trainer Resistance
actions.decrease = function ()
kb.press("numsubtract");
end


--@help Action Menu
actions.action = function ()
kb.press("up");
end


-- Workout Mode


--@help Graph
actions.graph = function ()
kb.stroke("G");
end


--@help ERG Mode
actions.erg = function ()
kb.press("e");
end


--@help Toggle Workout Elements
actions.workout = function ()
kb.press("w");
end


--@help 1% Harder
actions.harder = function ()
kb.press("pgup");
end


--@help 1% Easier
actions.easier = function ()
kb.press("pgdown");
end


--@help Skip Forward
actions.forward = function ()
kb.press("tab");
end


--@help Skip Back
actions.back = function ()
kb.stroke("shift", "tab");
end


--@help Pause Workout
actions.pause = function ()
kb.press("space");
end
Binary file added Gaming/TrainingPeaks-Virtual/right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Gaming/TrainingPeaks-Virtual/screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Gaming/TrainingPeaks-Virtual/uturn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.