Skip to content

Commit

Permalink
ERG setting high resistance on Merach S09 (Issue #1683) (#1701)
Browse files Browse the repository at this point in the history
  • Loading branch information
hortocam authored Oct 12, 2023
1 parent ba3bb3b commit 3686b77
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions src/fitplusbike.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -990,25 +990,26 @@ uint16_t fitplusbike::wattsFromResistance(double resistance) {
const double Epsilon = 4.94065645841247E-324;

if (merach_MRK) {
const int wattTableFirstDimension = 16;
const int wattTableFirstDimension = 17;
const int wattTableSecondDimension = 11;
double wattTable[wattTableFirstDimension][wattTableSecondDimension] = {
{Epsilon, 14, 29, 43, 58, 72, 87, 101, 116, 130, 144},
{Epsilon, 16, 33, 49, 65, 82, 98, 114, 130, 147, 163},
{Epsilon, 19, 37, 56, 74, 93, 111, 130, 148, 167, 185},
{Epsilon, 21, 42, 63, 84, 105, 126, 147, 168, 189, 210},
{Epsilon, 23, 46, 69, 92, 116, 139, 162, 185, 208, 231},
{Epsilon, 25, 51, 76, 101, 126, 152, 177, 202, 227, 253},
{Epsilon, 27, 55, 82, 110, 137, 165, 192, 220, 247, 274},
{Epsilon, 30, 60, 90, 120, 149, 179, 209, 239, 269, 299},
{Epsilon, 32, 63, 95, 127, 158, 190, 222, 253, 285, 317},
{Epsilon, 34, 68, 103, 137, 171, 205, 239, 274, 308, 342},
{Epsilon, 36, 72, 108, 145, 181, 217, 253, 289, 325, 362},
{Epsilon, 39, 77, 116, 154, 193, 231, 270, 308, 347, 385},
{Epsilon, 41, 82, 122, 163, 204, 245, 286, 327, 367, 408},
{Epsilon, 43, 86, 129, 172, 215, 258, 301, 344, 387, 431},
{Epsilon, 45, 90, 135, 180, 226, 271, 316, 361, 406, 451},
{Epsilon, 47, 95, 142, 189, 237, 284, 332, 379, 426, 474}};
{Epsilon, 14.3, 28.6, 42.9, 57.2, 71.5, 85.8, 100.1, 114.4, 128.7, 143.0},
{Epsilon, 14.3, 28.6, 42.9, 57.2, 71.5, 85.8, 100.1, 114.4, 128.7, 143.0},
{Epsilon, 16.4, 32.8, 49.2, 65.6, 82.0, 98.4, 114.8, 131.2, 147.6, 164.0},
{Epsilon, 18.7, 37.4, 56.1, 74.8, 93.5, 112.2, 130.9, 149.6, 168.3, 187.0},
{Epsilon, 21.0, 42.0, 63.0, 84.0, 105.0, 126.0, 147.0, 168.0, 189.0, 210.0},
{Epsilon, 23.2, 46.4, 69.6, 92.8, 116.0, 139.2, 162.4, 185.6, 208.8, 232.0},
{Epsilon, 25.3, 50.6, 75.9, 101.2, 126.5, 151.8, 177.1, 202.4, 227.7, 253.0},
{Epsilon, 27.6, 55.2, 82.8, 110.4, 138.0, 165.6, 193.2, 220.8, 248.4, 276.0},
{Epsilon, 30.0, 60.0, 90.0, 120.0, 150.0, 180.0, 210.0, 240.0, 270.0, 300.0},
{Epsilon, 31.9, 63.8, 95.7, 127.6, 159.5, 191.4, 223.3, 255.2, 287.1, 319.0},
{Epsilon, 34.2, 68.4, 102.6, 136.8, 171.0, 205.2, 239.4, 273.6, 307.8, 342.0},
{Epsilon, 36.5, 73.0, 109.5, 146.0, 182.5, 219.0, 255.5, 292.0, 328.5, 365.0},
{Epsilon, 38.5, 77.0, 115.5, 154.0, 192.5, 231.0, 269.5, 308.0, 346.5, 385.0},
{Epsilon, 40.8, 81.6, 122.4, 163.2, 204.0, 244.8, 285.6, 326.4, 367.2, 408.0},
{Epsilon, 43.1, 86.2, 129.3, 172.4, 215.5, 258.6, 301.7, 344.8, 387.9, 431.0},
{Epsilon, 45.1, 90.2, 135.3, 180.4, 225.5, 270.6, 315.7, 360.8, 405.9, 451.0},
{Epsilon, 47.2, 94.4, 141.6, 188.8, 236.0, 283.2, 330.4, 377.6, 424.8, 472.0}};

int level = resistance;
if (level < 0) {
Expand Down

0 comments on commit 3686b77

Please sign in to comment.