hitl_tester.test_cases.bms.e_ink
| Test | E-ink Sweep |
|---|---|
| GitHub Issue(s) | turnaroundfactor/HITL#308 |
| Description | Tests that the e-inks work at each SOC (manual inspection required) |
Used in these test plans:
- eink_sweep ⠀⠀⠀(bms/eink_sweep.plan)
Example Command (warning: test plan may run other test cases):
./hitl_tester.py eink_sweep
1""" 2| Test | E-ink Sweep | 3| :------------------- | :------------------------------------------------------------------ | 4| GitHub Issue(s) | turnaroundfactor/HITL#308 | 5| Description | Tests that the e-inks work at each SOC (manual inspection required) | 6""" 7 8from __future__ import annotations 9 10import pytest 11 12from hitl_tester.modules.bms.bms_hw import BMSHardware 13from hitl_tester.modules.logger import logger 14 15_bms = BMSHardware(pytest.flags) # type: ignore[arg-type] 16_bms.init() 17 18 19@pytest.mark.sim_cells 20def test_eink(): 21 """ 22 | Requirement | E-ink Sweep | 23 | :------------------- | :------------------------------------------------------------------------- | 24 | GitHub Issue(s) | turnaroundfactor/HITL#308 | 25 | Instructions | 1. Do the following forever </br>\ 26 2. Increment the SOC for each 20% chunk </br>\ 27 3. Manual inspect the e-ink to confirm it's reading correctly </br>\ 28 4. Decrement the SOC for each 20% chunk </br>\ 29 5. Manual inspect the e-ink to confirm it's reading correctly | 30 | Pass / Fail Criteria | Pass if e-ink displays correctly for all SOC | 31 """ 32 33 # Begin Knight Rider sweep 34 while True: 35 # Steps are in 20% chunks, so offset by 10% to use the middle of these ranges 36 for new_soc in (0.10, 0.30, 0.50, 0.70, 0.90, 0.70, 0.50, 0.30): 37 logger.write_info_to_report(f"Setting cell sims to {new_soc:%}") 38 for cell in _bms.cells.values(): 39 cell.state_of_charge = new_soc 40 logger.write_info_to_report("Press <Enter> to continue to next SOC.") 41 input()
@pytest.mark.sim_cells
def
test_eink():
20@pytest.mark.sim_cells 21def test_eink(): 22 """ 23 | Requirement | E-ink Sweep | 24 | :------------------- | :------------------------------------------------------------------------- | 25 | GitHub Issue(s) | turnaroundfactor/HITL#308 | 26 | Instructions | 1. Do the following forever </br>\ 27 2. Increment the SOC for each 20% chunk </br>\ 28 3. Manual inspect the e-ink to confirm it's reading correctly </br>\ 29 4. Decrement the SOC for each 20% chunk </br>\ 30 5. Manual inspect the e-ink to confirm it's reading correctly | 31 | Pass / Fail Criteria | Pass if e-ink displays correctly for all SOC | 32 """ 33 34 # Begin Knight Rider sweep 35 while True: 36 # Steps are in 20% chunks, so offset by 10% to use the middle of these ranges 37 for new_soc in (0.10, 0.30, 0.50, 0.70, 0.90, 0.70, 0.50, 0.30): 38 logger.write_info_to_report(f"Setting cell sims to {new_soc:%}") 39 for cell in _bms.cells.values(): 40 cell.state_of_charge = new_soc 41 logger.write_info_to_report("Press <Enter> to continue to next SOC.") 42 input()
| Requirement | E-ink Sweep |
|---|---|
| GitHub Issue(s) | turnaroundfactor/HITL#308 |
| Instructions | 1. Do the following forever 2. Increment the SOC for each 20% chunk 3. Manual inspect the e-ink to confirm it's reading correctly 4. Decrement the SOC for each 20% chunk 5. Manual inspect the e-ink to confirm it's reading correctly |
| Pass / Fail Criteria | Pass if e-ink displays correctly for all SOC |