Skip to content

Commit

Permalink
Introduce the keycode calibrator
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaDoes committed Jul 30, 2023
1 parent b4a14f4 commit 806d665
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 42 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
YOU CANNOT DOWNLOAD THIS UPDATE THROUGH MAGISK'S IN-APP MODULE UPDATER.

You can read the changelog and install this new update here: [Release v2.0.2](https://github.com/JoshuaDoes/pixel-tensor-audio-decompressor/releases/tag/202)
You can read the changelog and install this new update here: [Release v2.0.3](https://github.com/JoshuaDoes/pixel-tensor-audio-decompressor/releases/tag/203)
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ popd () {
}

echo "* Configuring the build environment"
export VER="v2.0.2"
export VER="v2.0.3"
export ZIP="pixel-tensor-audio-decompressor-$VER.zip"
export GOOS=linux
export GOARCH=arm64
Expand Down
32 changes: 21 additions & 11 deletions menu/keycalibrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,30 +101,40 @@ func calibrate() {
switch stage {
case 0:
clear(5)
fmt.Println("Welcome to the keyboard calibrator!")
fmt.Println("\t\tWelcome to the calibrator!\n")
time.Sleep(time.Second * 2)
fmt.Println("\t\tControllers and remotes\n\t\tare also supported.\n")
time.Sleep(time.Second * 2)
fmt.Println("\t\tThis is a guided process.\n")
calibrator.Ready = true
time.Sleep(time.Second * 1)
time.Sleep(time.Second * 2)
fmt.Println("\t\tGet ready!\n")
time.Sleep(time.Second * 3)
case 1:
clear(1)
calibrator.Action = "nextItem"
fmt.Println("Press any key to use to navigate down in a menu.")
fmt.Printf("\n")
fmt.Println("\t\tPress any key to use to\n\t\tnavigate down in a menu.\n")
fmt.Println("\t\t\tRecommended: volume down")
for calibrator.Action != "" {
}
case 2:
clear(1)
calibrator.Action = "prevItem"
fmt.Println("Press any key to use to navigate up in a menu.")
fmt.Printf("\n")
fmt.Println("\t\tPress any key to use to\n\t\tnavigate up in a menu.\n")
fmt.Println("\t\t\tRecommended: volume up")
for calibrator.Action != "" {
}
case 3:
clear(1)
calibrator.Action = "selectItem"
fmt.Println("Press any key to use to select a menu item.")
fmt.Printf("\n")
fmt.Println("\t\tPress any key to use to\n\t\tselect a menu item.\n")
fmt.Println("\t\t\tRecommended: touch screen")
for calibrator.Action != "" {
}
case 4:
clear(2)
fmt.Println("Saving calibration results...")
clear(5)
fmt.Println("\t\tSaving results...\n")
keyboards, err := json.Marshal(keyCalibration, true)
if err != nil {
panic(fmt.Sprintf("error encoding calibration results: %v", err))
Expand All @@ -139,8 +149,8 @@ func calibrate() {
panic(fmt.Sprintf("error writing calibration file: %v", err))
}
//fmt.Println(string(keyboards))
fmt.Println("Calibration complete!")
time.Sleep(time.Second * 1)
fmt.Println("\t\tCalibration complete!")
time.Sleep(time.Second * 2)
//calibrator.Ready = false
}
}
Expand Down
2 changes: 1 addition & 1 deletion module/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ print_modname() {
ui_print ""
ui_print "***********************************"
ui_print "* Pixel Tensor Audio Decompressor *"
ui_print " * 2.0.2 * "
ui_print " * 2.0.3 * "
ui_print "** Made and tested by JoshuaDoes **"
ui_print "***********************************"
ui_print "For the following devices:"
Expand Down
21 changes: 0 additions & 21 deletions module/keyCalibration.json

This file was deleted.

4 changes: 2 additions & 2 deletions module/menu.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"menus": {
"home": {
"noGoBack": true,
"title": "Pixel Tensor Audio Decompressor\n JoshuaDoes | v2.0.2 ",
"subtitle": "\tTap screen to select.\n\tUse volume keys to navigate.",
"title": "Pixel Tensor Audio Decompressor\n JoshuaDoes | v2.0.3 ",
"subtitle": "\tIf you calibrated wrongly,\n\tclose Magisk and try again.",
"items": [
{
"text": "Cancel install",
Expand Down
4 changes: 2 additions & 2 deletions module/module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=pixel-tensor-audio-decompressor
name=Pixel Tensor Audio Decompressor
version=v2.0.2
versionCode=202
version=v2.0.3
versionCode=203
author=JoshuaDoes
description=Patches mixer_paths.xml on Pixel Tensor devices to decompress the digital PCM volume.
updateJson=https://raw.githubusercontent.com/JoshuaDoes/pixel-tensor-audio-decompressor/dev/update.json
6 changes: 3 additions & 3 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "v2.0.2",
"versionCode": 202,
"zipUrl": "https://github.com/JoshuaDoes/pixel-tensor-audio-decompressor/releases/tag/202",
"version": "v2.0.3",
"versionCode": 203,
"zipUrl": "https://github.com/JoshuaDoes/pixel-tensor-audio-decompressor/releases/tag/203",
"changelog": "https://raw.githubusercontent.com/JoshuaDoes/pixel-tensor-audio-decompressor/dev/CHANGELOG.md"
}

0 comments on commit 806d665

Please sign in to comment.