Skip to content

Commit

Permalink
All metrics now zero when correct BLE !connected
Browse files Browse the repository at this point in the history
  • Loading branch information
doudar committed Jan 20, 2021
1 parent 56411b8 commit fb053e5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define SETTINGS_H

//Current program version info. Used for auto updates
#define FIRMWARE_VERSION "0.1.1.10"
#define FIRMWARE_VERSION "0.1.1.11"

//Update firmware on boot?
#define AUTO_FIRMWARE_UPDATE true
Expand Down
2 changes: 1 addition & 1 deletion src/BLE_Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ void SpinBLEClient::serverScan(bool connectRequest)
// Load the scan into a Json String
int count = foundDevices.getCount();

StaticJsonDocument<500> devices;
StaticJsonDocument<1000> devices;

String device = "";

Expand Down
9 changes: 9 additions & 0 deletions src/BLE_Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,15 @@ void BLENotify(void *pvParameters)
{
calculateInstPwrFromHR();
}
if (!spinBLEClient.connectedPM && !userPWC.hr2Pwr)
{
userConfig.setSimulatedCad(0);
userConfig.setSimulatedWatts(0);
}
if (!spinBLEClient.connectedHR)
{
userConfig.setSimulatedHr(0);
}

if (_BLEClientConnected)
{
Expand Down

6 comments on commit fb053e5

@doudar
Copy link
Owner Author

@doudar doudar commented on fb053e5 Jan 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#65 @sspeiser , this should fix your report of power and HR showing when none was available.

Previous fixes should also be in place to help your pairing issue. Let me know if they helped please.

I will push an OTA Update to existing devices when @fireyeti completes thorough testing today.

@doudar
Copy link
Owner Author

@doudar doudar commented on fb053e5 Jan 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#69 Power will now zero when correct BLE server is not available or HR->PWR is selected off.

@sspieser
Copy link

@sspieser sspieser commented on fb053e5 Jan 20, 2021 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@doudar
Copy link
Owner Author

@doudar doudar commented on fb053e5 Jan 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great news! Thanks for all your testing! Couldn't have done it without you!

I'll close the other issue if that's okay and start a new one to add an option to double the power output.

Many other apps have a similar power double function for this exact reason.

That should be an easy change and I'll have it done in a couple days.

@doudar
Copy link
Owner Author

@doudar doudar commented on fb053e5 Jan 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sspieser , I will add pairing both pedals to the roadmap but that's a larger project whereas simply doubling the power output is very easy.

@sspieser
Copy link

@sspieser sspieser commented on fb053e5 Jan 20, 2021 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.