Skip to content

Commit

Permalink
distance added to domyos console
Browse files Browse the repository at this point in the history
  • Loading branch information
cagnulein committed Oct 17, 2020
1 parent c5dd482 commit b5cd1d5
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/domyostreadmill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,26 @@ void domyostreadmill::updateDisplay(uint16_t elapsed)
display[3] = (elapsed / 60) & 0xFF; // high byte for elapsed time (in seconds)
display[4] = (elapsed % 60 & 0xFF); // low byte for elasped time (in seconds)

//if(odometer() < 10.0)
{
display[7] = ((uint8_t)(odometer() * 100) >> 8) & 0xFF;
display[8] = (uint8_t)(odometer() * 100) & 0xFF;
}
/*else
{
display[7] = ((uint8_t)(odometer() * 10) >> 8) & 0xFF;
display[8] = (uint8_t)(odometer() * 10) & 0xFF;
}*/

display[12] = currentHeart();

display[15] = ((((uint8_t)currentInclination()) * 10) >> 8) & 0xFF;
display[16] = (((uint8_t)currentInclination()) * 10) & 0xFF;
//display[13] = ((((uint8_t)currentInclination()) * 10) >> 8) & 0xFF;
//display[14] = (((uint8_t)currentInclination()) * 10) & 0xFF;

//display[13] = ((((uint8_t)calories())) >> 8) & 0xFF;
//display[14] = (((uint8_t)calories())) & 0xFF;

display[20] = (uint8_t)currentSpeed();
//display[20] = (uint8_t)currentSpeed();

for(uint8_t i=0; i<sizeof(display)-1; i++)
{
Expand Down

1 comment on commit b5cd1d5

@cagnulein
Copy link
Owner Author

Choose a reason for hiding this comment

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

#24

Please sign in to comment.