This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# iFit2-Metrics-OCR - 'Retrieve iFit2 Workout Metrics via OCR | |
# Author: Al Udell | |
# Revised: November 20, 2024 | |
# --- functions --- | |
# Validate RPM values function | |
def validate_rpm(value): | |
try: | |
if '/' in value: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Zwift-Workout.py - Take Zwift screenshot, crop workout instructions, and OCR workout instructions to extract speed and incline | |
# Author: Al Udell | |
# Revised: November 6, 2024 | |
# imports | |
import cv2 | |
import numpy as np | |
import re | |
from PIL import Image, ImageGrab | |
import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' iFit2-Zwift-Workout - Zwift workouts auto-incline and auto-speed control of treadmill via ADB and OCR | |
' Author: Al Udell | |
' Revised: November 6, 2024 | |
' To debug - enable wscript.echo and run by cscript in command line | |
' On Error Resume Next | |
' Display startup message | |
createobject("wscript.shell").popup "Ensure treadmill is in manual workout mode with onscreen speed and incline controls visible. " _ | |
& vbCrLf & vbCrLf & "Also ensure Zwift is running in game with workout dashboard showing.", 10, "Warning", 64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Zwift-Incline-Climb-Portal.py - Take Zwift screenshot, crop portal incline, OCR climb portal incline | |
# Author: Al Udell | |
# Revised: November 5, 2024 | |
# imports | |
import cv2 | |
import numpy as np | |
import re | |
from PIL import Image, ImageGrab | |
import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Zwift-Incline.py - Take Zwift screenshot, crop incline, OCR incline | |
# Author: Al Udell | |
# Revised: November 5, 2024 | |
# imports | |
import cv2 | |
import numpy as np | |
import re | |
from PIL import Image, ImageGrab | |
import requests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' iFit2-Zwift - Zwift auto-incline control of treadmill via ADB and OCR | |
' Author: Al Udell | |
' Revised: November 5, 2024 | |
' To debug - enable wscript.echo and run by cscript in command line | |
' On Error Resume Next | |
' Display startup message | |
CreateObject("wscript.shell").Popup "Ensure treadmill is in manual workout mode with onscreen speed and incline controls visible." _ | |
& vbCrLf & vbCrLf & "Also ensure Zwift is running in game with incline showing.", 10, "Warning", 64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' iFit2-Incline-Batch - Test batch sequence of inclines with iFit2 auto-incline control of treadmill via ADB | |
' Author: Al Udell | |
' Revised: November 4, 2024 | |
' To debug - enable wscript.echo and run by cscript in command line | |
' On error resume next | |
' Initialize | |
set wso = createobject("wscript.shell") | |
buttonCount = 8 ' number of displayed buttons |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' iFit2-Speed-Batch - Test batch sequence of speeds with iFit2 auto-speed control of treadmill via ADB | |
' Author: Al Udell | |
' Revised: November 4, 2024 | |
' To debug - enable wscript.echo and run by cscript in command line | |
' On error resume next | |
' Initialize | |
set wso = createobject("wscript.shell") | |
buttonCount = 8 ' number of displayed buttons |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' iFit2-Control - 'iFit2 auto-speed and auto-incline control of treadmill via ADB | |
' Author: Al Udell | |
' Revised: November 4, 2024 | |
' To debug - enable wscript.echo and run by cscript in command line | |
' On error resume next | |
createobject("wscript.shell").popup "Ensure treadmill is in manual workout mode and onscreen speed and incline controls are visible", 5, "Warning", 64 | |
' Initialize |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' iFit2-Metrics - 'Retrieve iFit2 Workout Metrics ( treadmill speed and incline) via ADB | |
' Author: Al Udell | |
' Revised: November 4, 2024 | |
'to debug - enable wscript.echo and run by cscript in command line | |
'on error resume next | |
'initialize | |
set wso = createobject("wscript.shell") |