(self, mod)
| 146 | self.mask = wx.LIST_MASK_IMAGE |
| 147 | |
| 148 | def getText(self, mod): |
| 149 | if not isinstance(mod, Module) or mod.state != FittingModuleState.OVERHEATED: |
| 150 | return "" |
| 151 | |
| 152 | thermo = Thermodynamics(Fit.getInstance().getFit(self.mainFrame.getActiveFit())) |
| 153 | burnCycles = thermo.calcBurnCycles(mod) |
| 154 | duration = mod.getModifiedItemAttr("duration") / 1000 |
| 155 | speed = mod.getModifiedItemAttr("speed") / 1000 |
| 156 | cycleTime = duration or speed |
| 157 | |
| 158 | t = burnCycles * cycleTime |
| 159 | s = t % 60 |
| 160 | m = (t / 60) % 60 |
| 161 | h = (t / 3600) % 24 |
| 162 | out = [f"{int(m):02d}", f"{int(s):02d}"] |
| 163 | |
| 164 | if int(h) > 0: # hours is rarely relevant, only show if it is |
| 165 | out.insert(0, f"{int(h):02d}") |
| 166 | |
| 167 | return ":".join(out) # display as 00:00:00 to vertically align across slot cols consistently |
| 168 | |
| 169 | def getToolTip(self, mod): |
| 170 | if isinstance(mod, Module) and mod.state == FittingModuleState.OVERHEATED: |
nothing calls this directly
no test coverage detected