cagnulein / qdomyos-zwift

Zwift bridge for smart treadmills and bike/cyclette
https://www.qzfitness.com/
GNU General Public License v3.0
436 stars 123 forks source link

[BUG] - Powermeter pédale and ERG #2818

Open mathsz opened 6 days ago

mathsz commented 6 days ago

Can’t reach wattage set by erg mode.

To Reproduce Steps to reproduce the behavior:

  1. Go to '.a workout..'
  2. Click on '.start...'
  3. Scroll down to '....'
  4. See error

Expected behavior The pedals power output to “drive” the erg behaviour

Screenshots If applicable, add [screenshots]() to help explain your problem. IMG_4394

Desktop (please complete the following information):

Smartphone (please complete the following information):

Append a debug log

Follow this guide https://github.com/cagnulein/qdomyos-zwift/wiki/How-do-i-get-the-debug-log-in-case-something-doesn't-work%3F

Additional context Add any other context about the problem here.

cagnulein commented 6 days ago

Thanks I will check it ASAP

Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

Il giorno dom 24 nov 2024 alle 17:17 mathsz @.***> ha scritto:

Assigned #2818 https://github.com/cagnulein/qdomyos-zwift/issues/2818 to @cagnulein https://github.com/cagnulein.

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2818#event-15410945828, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWDLPDTNUYUXSFG6QMT2CH33BAVCNFSM6AAAAABSMMFGIKVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJVGQYTAOJUGU4DEOA . You are receiving this because you were assigned.Message ID: @.***>

mathsz commented 6 days ago

Additional screenshots

image image

image

image

CAN reproduce at will and happy to help. Pedals are calibrated or zero calibration is done with garmin gps

Thanks

cagnulein commented 6 days ago

Calibrate qz first doing some spin to higher resistance for at least 30 seconds to each resistance (at least from resistance 25 to 32)

Let me know

mathsz commented 6 days ago

Erg off? Like just put it very hard and spin? Then put erg back on? Thanks

cagnulein commented 6 days ago

Qz standalone so even with erg enabled, it doesn't matter. Qz will record the speed on higher resistance so it will know which resistance level set when zwift requests it

Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

Il giorno dom 24 nov 2024 alle 17:53 mathsz @.***> ha scritto:

Erg off? Like just put it very hard and spin? Then put erg back on? Thanks

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2818#issuecomment-2496105256, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWH5MYE7LDFCAV34WGD2CH77JAVCNFSM6AAAAABSMMFGIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJWGEYDKMRVGY . You are receiving this because you were mentioned.Message ID: @.***>

cagnulein commented 6 days ago

It must be 30 seconds on each resistance

Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

Il giorno dom 24 nov 2024 alle 17:54 cagnulein @.***> ha scritto:

Qz standalone so even with erg enabled, it doesn't matter. Qz will record the speed on higher resistance so it will know which resistance level set when zwift requests it

Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

Il giorno dom 24 nov 2024 alle 17:53 mathsz @.***> ha scritto:

Erg off? Like just put it very hard and spin? Then put erg back on? Thanks

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2818#issuecomment-2496105256, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWH5MYE7LDFCAV34WGD2CH77JAVCNFSM6AAAAABSMMFGIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJWGEYDKMRVGY . You are receiving this because you were mentioned.Message ID: @.***>

cagnulein commented 6 days ago

30 seconds on each resistance at least of course :)

mathsz commented 5 days ago

[ debug-lunnov25_07_47_51_2024.log ]

30s+ 🥵

cagnulein commented 5 days ago

perfect, did you give it a try to zwift now? send me a debug log if it still doesn't work

Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

Il giorno lun 25 nov 2024 alle ore 14:02 mathsz @.***> ha scritto:

[ debug-lunnov25_07_47_51_2024.log https://github.com/user-attachments/files/17903232/debug-lun__nov__25_07_47_51_2024.log ]

30s+ 🥵

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2818#issuecomment-2497964477, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWFRIJHNYVH2RNSYTRD2CMNXNAVCNFSM6AAAAABSMMFGIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJXHE3DINBXG4 . You are receiving this because you were mentioned.Message ID: @.***>

mathsz commented 5 days ago

debug-lunnov25_08_12_22_2024.log Screenshots incoming. Kept rpm lower to make it drop. It did not want to go up to resistance 26.

Tried 30w watt up watt down

15w

10w

20w

30w

mathsz commented 5 days ago

image

Missed a few stars again

cagnulein commented 5 days ago

ok i will check this in the next days, i'm currently very busy with my main job. thanks

Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

Il giorno lun 25 nov 2024 alle ore 14:45 mathsz @.***> ha scritto:

5E038C02-4413-4EA6-83E5-474CA0A78388.jpeg (view on web) https://github.com/user-attachments/assets/666e15f4-216f-40b8-b65f-64d7959cdb96

Missed a few stars again

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2818#issuecomment-2498063143, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWAMAVDHTOGEUIFTSUT2CMSXPAVCNFSM6AAAAABSMMFGIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJYGA3DGMJUGM . You are receiving this because you were mentioned.Message ID: @.***>

mathsz commented 5 days ago

Don't worry about it, Roberto. I am using manual mode and it works well for me. I must be one of the few that use powermeter pedals.

Big thanks for your help. I know you have lots of requests so I did not want to bug you with it.

Have a great day!

cagnulein commented 5 days ago

i quickly checked the log and the reason it's because

when there is a power request of 335

qz is looking through the tablet that you collect in the calibration process and at 86 cadence the resistance level 25 was giving 318W instead the level 26 was giving 353W

so qz is doing what i wrote in the code (correct or not :D ) putting you on the 25, so in the middle of this. i have to check in the calibration log if the 318W at 25R was just a strange peak or it was correct.

did you try in the meantime to use the gears to add one more resistance level during erg mode? i didn't remember if i enabled this for all the bikes, but i guess so.

Let me know

mathsz commented 5 days ago

It was a peak. So what I'll do is try with the watt down filter really big (to accommodate peaks(50w) and watt up lower (10w) so it suggest a higher gear quicker.

Let you know what I find

cagnulein commented 5 days ago

Ok I will check if I can fix it from the table. I will check it in the next days

Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

Il giorno lun 25 nov 2024 alle 17:57 mathsz @.***> ha scritto:

It was a peak. So what I'll do is try with the watt down filter really big (to accommodate peaks(50w) and watt up lower (10w) so it suggest a higher gear quicker.

Let you know what I find

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2818#issuecomment-2498551850, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWB5S6B4DJ6VFW4PAXT2CNJGRAVCNFSM6AAAAABSMMFGIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJYGU2TCOBVGA . You are receiving this because you were mentioned.Message ID: @.***>

cagnulein commented 4 days ago

it was a 1sec peak

lun. nov. 25 07:59:07 2024 1732539547873 Debug: /Users/cagnulein/qdomyos-zwift/src/devices/bluetooth.cpp void bluetooth::debug(const QString &) "Current watt: 310"
lun. nov. 25 07:59:08 2024 1732539548144 Debug: /Users/cagnulein/qdomyos-zwift/src/devices/bluetooth.cpp void bluetooth::debug(const QString &) "Current watt: 310"
lun. nov. 25 07:59:08 2024 1732539548418 Debug: /Users/cagnulein/qdomyos-zwift/src/devices/bluetooth.cpp void bluetooth::debug(const QString &) "Current watt: 310"
lun. nov. 25 07:59:08 2024 1732539548958 Debug: /Users/cagnulein/qdomyos-zwift/src/devices/bluetooth.cpp void bluetooth::debug(const QString &) "Current watt: 318"
lun. nov. 25 07:59:08 2024 1732539548981 Debug: /Users/cagnulein/qdomyos-zwift/src/devices/bluetooth.cpp void bluetooth::debug(const QString &) "Current watt: 318"

do you have something to averaging the wattage to 1s at least on the pedal? because now the pedal are sending wattage every 300ms and so this means that you have a lot of noise in the reading. Otherwise one solution could be use the averaging of the last 3 or 5 seconds to add them in the table.

Let me know

mathsz commented 4 days ago

So yesterday I was going to write this :"I believe, correct me if wrong, pedals have too erratic power. Wonder it making it read avg1s power would be less erratic"

But then I thought, you know what, Mathieu? He has a job so be quiet a little 😂

Ok I'll see if there is a possibility to do 1s avg via garmin. I don't think it's possible. The gps can show 1s avg or 3s avg, but not the pedals.

Checking now. Get back to you.

mathsz commented 4 days ago

Not possible as suspected

image image

cagnulein commented 4 days ago

ok i will try to do a patch asap. unfortunately this will require to do the calibration on qz :( software testing is an hard work for your legs :D

mathsz commented 4 days ago

letsgoGif

yougotthis

faithindev,#paininleg

mathsz commented 3 days ago

Hi again. Since it's 300ms. Wouldn't 3s be easier? Like 10 datapoints? 🤷‍♂️

cagnulein commented 3 days ago

It's more than that. I played with your data and there are spikes to be filtered. I will try some algorithms in the next days

Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

Il giorno gio 28 nov 2024 alle 00:30 mathsz @.***> ha scritto:

Hi again. Since it's 300ms. Wouldn't 3s be easier? Like 10 datapoints? 🤷‍♂️

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2818#issuecomment-2504975628, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWFRXVSXXNSZMZVUSMD2CZI25AVCNFSM6AAAAABSMMFGIKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMBUHE3TKNRSHA . You are receiving this because you were mentioned.Message ID: @.***>