Called by ControlMotor() & Enable()
| 261 | |
| 262 | // Called by ControlMotor() & Enable() |
| 263 | void Disk2InterfaceCard::CheckSpinning(const bool stateChanged, const ULONG uExecutedCycles) |
| 264 | { |
| 265 | bool modeChanged = m_floppyMotorOn && !m_floppyDrive[m_currDrive].m_spinning; |
| 266 | |
| 267 | if (m_floppyMotorOn && IsDriveConnected(m_currDrive)) |
| 268 | m_floppyDrive[m_currDrive].m_spinning = SPINNING_CYCLES; |
| 269 | |
| 270 | if (modeChanged) |
| 271 | GetFrame().FrameDrawDiskLEDS(); |
| 272 | |
| 273 | if (modeChanged) |
| 274 | { |
| 275 | // Set m_diskLastCycle when motor changes: not spinning (ie. off for 1 sec) -> on |
| 276 | m_diskLastCycle = g_nCumulativeCycles; |
| 277 | } |
| 278 | |
| 279 | if (m_floppyMotorOn && stateChanged) |
| 280 | { |
| 281 | // Set m_motorOnCycle when: motor changes to on, or the other drive is enabled (and motor is on) |
| 282 | m_floppyDrive[m_currDrive].m_motorOnCycle = g_nCumulativeCycles; |
| 283 | } |
| 284 | } |
| 285 | |
| 286 | //=========================================================================== |
| 287 |
nothing calls this directly
no test coverage detected