Compare commits

...

20 Commits

Author SHA1 Message Date
Roberto Viola
e48af4e864 Update main.yml 2023-07-20 17:39:50 +02:00
Roberto Viola
e990a27f65 Update main.yml 2023-07-20 16:15:17 +02:00
Roberto Viola
4c88304be0 Update main.yml 2023-07-20 16:14:21 +02:00
Roberto Viola
4c1d39d68c Update main.yml 2023-07-20 16:12:38 +02:00
Roberto Viola
efc92f72b2 Update main.yml 2023-07-20 14:37:13 +02:00
Roberto Viola
424e21a8fa Update main.yml 2023-07-20 14:03:14 +02:00
Roberto Viola
51bc2ffb48 Update main.yml 2023-07-20 12:00:28 +02:00
Roberto Viola
7cfd1ba93b Update main.yml 2023-07-20 11:58:34 +02:00
Roberto Viola
c01e5ccb14 Update main.yml 2023-07-20 11:49:08 +02:00
Roberto Viola
dd495f1a76 Merge branch 'master' into android_CI_googleplay 2023-07-20 11:48:52 +02:00
Roberto Viola
458c44758e Android QT Jars patched (#1575)
* Add files via upload

* adding only bluetooth one
2023-07-20 11:45:30 +02:00
Roberto Viola
78e3a33596 Update main.yml 2023-07-20 11:23:17 +02:00
Roberto Viola
77a9fc718a Update main.yml 2023-07-20 11:13:54 +02:00
Roberto Viola
be12859343 No charts when using floating window #1565 2023-07-19 09:53:21 +02:00
Roberto Viola
d201919b55 HR on iPad issue #1529 2023-07-19 09:38:07 +02:00
Roberto Viola
138a42c2e6 fixing CI build 2023-07-18 16:29:08 +02:00
Roberto Viola
bbe69f3f60 fixing build error 2023-07-18 16:02:50 +02:00
Roberto Viola
b95b3a5018 adding gears to wahookickrsnapbike as did for tacxneo
b443b03d49
2023-07-18 15:54:48 +02:00
Roberto Viola
fb0cbb74a5 adding smtp server info on the bottom of the email 2023-07-18 14:28:54 +02:00
Roberto Viola
deed6019ab adding restore purchase button for iOS guidelines 2023-07-18 14:28:33 +02:00
13 changed files with 96 additions and 9 deletions

View File

@@ -513,7 +513,7 @@ jobs:
- name: Install Qt Android
uses: jurplel/install-qt-action@v3
with:
version: '5.15.2'
version: '5.15.0'
host: 'linux'
target: 'android'
arch: 'android'
@@ -527,6 +527,9 @@ jobs:
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '11'
- name: patching qt for bluetooth
run: cp qt-patches/android/5.15.0/jar/*.* ${{ github.workspace }}/output/android/Qt/5.15.0/android/jar/
- name: Set Android NDK 21 && build
run: |
@@ -538,6 +541,12 @@ jobs:
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
export ANDROID_NDK="${ANDROID_SDK_ROOT}/ndk-bundle"
export ANDROID_NDK_ROOT="${ANDROID_NDK}"
cd src
echo "#define STRAVA_SECRET_KEY ${{ secrets.strava_secret_key }}" > secret.h
echo "#define SMTP_USERNAME ${{ secrets.smtp_username }}" >> secret.h
echo "#define SMTP_PASSWORD ${{ secrets.smtp_password }}" >> secret.h
echo "#define SMTP_SERVER ${{ secrets.smtp_server }}" >> secret.h
cd ..
ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK
rm -rf /usr/local/lib/android/sdk/ndk/25.1.8937393
@@ -546,6 +555,43 @@ jobs:
- name: Build APK (not usable for production due to unpatched QT library)
run: cd src; androiddeployqt --input android-qdomyos-zwift-deployment-settings.json --output ${{ github.workspace }}/output/android/ --android-platform android-31 --gradle --aab
- uses: r0adkll/sign-android-release@v1
name: Sign app APK
# ID used to access action output
id: sign_app
with:
releaseDirectory: ${{ github.workspace }}/output/android/build/outputs/apk/debug/
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
# override default build-tools version (29.0.3) -- optional
BUILD_TOOLS_VERSION: "30.0.2"
- uses: r0adkll/sign-android-release@v1
name: Sign app AAB
# ID used to access action output
id: sign_aab
with:
releaseDirectory: ${{ github.workspace }}/output/android/build/outputs/bundle/debug/
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
# override default build-tools version (29.0.3) -- optional
BUILD_TOOLS_VERSION: "30.0.2"
- uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: org.cagnulen.qdomyoszwift
releaseFiles: ${{steps.sign_aab.outputs.signedReleaseFile}}
track: internal
status: draft
inAppUpdatePriority: 2
ios-build:
# The type of runner that the job will run on
runs-on: macos-latest

Binary file not shown.

View File

@@ -93,7 +93,7 @@ Item {
onLinkActivated: Qt.openUrlExternally(link)
}
/*Button {
Button {
id: restoreButton
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
@@ -101,7 +101,8 @@ Item {
text: "Restore Purchases"
onClicked: {
console.log("restoring...");
toast.show("Restoring...");
iapStore.restorePurchases();
}
}*/
}
}

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<manifest package="org.cagnulen.qdomyoszwift" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:versionName="2.13.98" android:versionCode="614" android:installLocation="auto">
<manifest package="org.cagnulen.qdomyoszwift" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:versionName="2.13.99" android:versionCode="615" android:installLocation="auto">
<!-- The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions. -->
<!-- %%INSERT_PERMISSIONS -->

View File

@@ -3202,6 +3202,9 @@ void homeform::StopRequested() {
void homeform::Stop() {
QSettings settings;
m_startRequested = false;
qDebug() << QStringLiteral("Stop pressed - paused") << paused << QStringLiteral("stopped") << stopped;
if (stopped) {
@@ -5959,6 +5962,10 @@ void homeform::sendMail() {
}
}
#ifdef SMTP_SERVER
textMessage += QStringLiteral("\n\nSMTP server: ") + QString(STRINGIFY(SMTP_SERVER));
#endif
text.setText(textMessage);
message.addPart(&text);

View File

@@ -737,7 +737,7 @@ ApplicationWindow {
}
ItemDelegate {
text: "version 2.13.98"
text: "version 2.13.99"
width: parent.width
}

View File

@@ -812,4 +812,4 @@ INCLUDEPATH += purchasing/inapp
WINRT_MANIFEST = AppxManifest.xml
VERSION = 2.13.98
VERSION = 2.13.99

View File

@@ -664,8 +664,9 @@ const QString QZSettings::fakedevice_rower = QStringLiteral("fakedevice_rower");
const QString QZSettings::zwift_ocr_climb_portal = QStringLiteral("zwift_ocr_climb_portal");
const QString QZSettings::poll_device_time = QStringLiteral("poll_device_time");
const QString QZSettings::proform_bike_PFEVEX71316_1 = QStringLiteral("proform_bike_PFEVEX71316_1");
const QString QZSettings::schwinn_bike_resistance_v3 = QStringLiteral("schwinn_bike_resistance_v3");
const uint32_t allSettingsCount = 556;
const uint32_t allSettingsCount = 557;
QVariant allSettings[allSettingsCount][2] = {
{QZSettings::cryptoKeySettingsProfiles, QZSettings::default_cryptoKeySettingsProfiles},
@@ -1228,6 +1229,7 @@ QVariant allSettings[allSettingsCount][2] = {
{QZSettings::zwift_ocr_climb_portal, QZSettings::default_zwift_ocr_climb_portal},
{QZSettings::poll_device_time, QZSettings::default_poll_device_time},
{QZSettings::proform_bike_PFEVEX71316_1, QZSettings::default_proform_bike_PFEVEX71316_1},
{QZSettings::schwinn_bike_resistance_v3, QZSettings::default_schwinn_bike_resistance_v3},
};
void QZSettings::qDebugAllSettings(bool showDefaults) {

View File

@@ -1863,6 +1863,9 @@ class QZSettings {
static const QString proform_bike_PFEVEX71316_1;
static constexpr bool default_proform_bike_PFEVEX71316_1 = false;
static const QString schwinn_bike_resistance_v3;
static constexpr bool default_schwinn_bike_resistance_v3 = false;
/**
* @brief Write the QSettings values using the constants from this namespace.
* @param showDefaults Optionally indicates if the default should be shown with the key.

View File

@@ -555,6 +555,8 @@ resistance_t schwinnic4bike::pelotonToBikeResistance(int pelotonResistance) {
QSettings settings;
bool schwinn_bike_resistance_v2 =
settings.value(QZSettings::schwinn_bike_resistance_v2, QZSettings::default_schwinn_bike_resistance_v2).toBool();
bool schwinn_bike_resistance_v3 =
settings.value(QZSettings::schwinn_bike_resistance_v3, QZSettings::default_schwinn_bike_resistance_v3).toBool();
if (!schwinn_bike_resistance_v2) {
if (pelotonResistance > 54)
return pelotonResistance;
@@ -563,6 +565,12 @@ resistance_t schwinnic4bike::pelotonToBikeResistance(int pelotonResistance) {
// y = 0,04x2 - 1,32x + 11,8
return ((0.04 * pow(pelotonResistance, 2)) - (1.32 * pelotonResistance) + 11.8);
} else if (schwinn_bike_resistance_v3) {
// y = 0,0007x3 - 0,0763x2 + 4,1619x - 75,788
if (pelotonResistance < 30)
return 0;
return qRound((0.0007 * pow(pelotonResistance, 3)) - (0.0763 * pow(pelotonResistance, 2)) + (4.1619 * pelotonResistance) + 75.788);
} else {
if (pelotonResistance > 20)
return (((double)pelotonResistance - 20.0) * 1.25);

View File

@@ -810,6 +810,7 @@ import QtQuick.Dialogs 1.0
// from version 2.13.99
property bool proform_bike_PFEVEX71316_1: false
property bool schwinn_bike_resistance_v3: false
}
function paddingZeros(text, limit) {
@@ -2214,7 +2215,7 @@ import QtQuick.Dialogs 1.0
}
SwitchDelegate {
id: schwinnBikeResistanceV2Delegate
text: qsTr("Resistance Alternative Calc.")
text: qsTr("Res. Alternative Calc. v2")
spacing: 0
bottomPadding: 0
topPadding: 0
@@ -2226,6 +2227,19 @@ import QtQuick.Dialogs 1.0
Layout.fillWidth: true
onClicked: settings.schwinn_bike_resistance_v2 = checked
}
SwitchDelegate {
text: qsTr("Res. Alternative Calc. v3")
spacing: 0
bottomPadding: 0
topPadding: 0
rightPadding: 0
leftPadding: 0
clip: false
checked: settings.schwinn_bike_resistance_v3
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
Layout.fillWidth: true
onClicked: settings.schwinn_bike_resistance_v3 = checked
}
RowLayout {
spacing: 10
Label {

View File

@@ -234,7 +234,10 @@ void wahookickrsnapbike::update() {
uint8_t b[20];
memcpy(b, a.constData(), a.length());
writeCharacteristic(b, a.length(), "setResistance", false, true);
} else if (virtualBike && virtualBike->ftmsDeviceConnected() && lastGearValue != gears()) {
inclinationChanged(lastGrade, lastGrade);
}
lastGearValue = gears();
requestResistance = -1;
}
if (requestStart != -1) {
@@ -789,8 +792,9 @@ void wahookickrsnapbike::controllerStateChanged(QLowEnergyController::Controller
void wahookickrsnapbike::inclinationChanged(double grade, double percentage) {
Q_UNUSED(percentage);
lastGrade = grade;
emit debug(QStringLiteral("writing inclination ") + QString::number(grade));
QByteArray a = setSimGrade(grade);
QByteArray a = setSimGrade(grade + gears());
uint8_t b[20];
memcpy(b, a.constData(), a.length());
writeCharacteristic(b, a.length(), "setSimGrade", false, true);

View File

@@ -83,6 +83,8 @@ class wahookickrsnapbike : public bike {
uint8_t sec1Update = 0;
QByteArray lastPacket;
double lastGearValue = -1;
double lastGrade = 0;
QDateTime lastRefreshCharacteristicChanged = QDateTime::currentDateTime();
QDateTime lastGoodCadence = QDateTime::currentDateTime();
uint8_t firstStateChanged = 0;