Rev 457 | Rev 459 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 457 | Rev 458 | ||
---|---|---|---|
Line 314... | Line 314... | ||
314 | uint8_t cellnum = 0; |
314 | uint8_t cellnum = 0; |
315 | if (CELL_NUM == -1) { |
315 | if (CELL_NUM == -1) { |
316 | write_ascii_string(2, 5, "Guessing Number of Cells"); |
316 | write_ascii_string(2, 5, "Guessing Number of Cells"); |
317 | do { |
317 | do { |
318 | cellnum++; |
318 | cellnum++; |
319 | } while (UBat > ((cellnum * CELL_VOLT_MAX) + 10)); |
319 | } while (UBat > ((cellnum * CELL_VOLT_MAX) + 15)); |
320 | } else { |
320 | } else { |
321 | cellnum = CELL_NUM; |
321 | cellnum = CELL_NUM; |
322 | } |
322 | } |
323 | min_voltage = cellnum * CELL_VOLT_MIN; |
323 | min_voltage = cellnum * CELL_VOLT_MIN; |
324 | max_voltage = cellnum * CELL_VOLT_MAX; |
324 | max_voltage = cellnum * CELL_VOLT_MAX; |