Focuser fails to move to

During almost every imaging run, I see an SGP error message stating the focuser has failed to move to the commanded position. I am highly confident my focuser does not have problem. These errors started being reported several releases ago. I suspected this might be a temperature compensation issue, so I finally looked at the SGP log this morning.

TC has to be disabled before the focuser is moved and then re-enabled when the move is completed. The problem is that SGP is turning TC back on before taking its confirmation position reading. I believe when TC is enabled, my focuser sees that a temperature change has occurred and immediately moves the focuser. Then when SGP checks the position, it sees the TC position and thinks the focuser failed to move to the commanded position.

The log shows SGP turning on TC before checking the position. So, it seems like SGP needs to check the move to commanded position before re-enabling TC:

[07/17/20 02:36:36.524][INFO][Camera Thread][SQ;AF;] Moving focuser to next position (16922)…
[07/17/20 02:36:36.524][DEBUG][Camera Thread][SQ;AF;] MoveFocuserAbs: Start, move to 16922…
[07/17/20 02:36:36.524][DEBUG][Camera Thread][SQ;AF;] ASCOM Focuser: MoveSync - start…
[07/17/20 02:36:36.524][DEBUG][Camera Thread][SQ;AF;] Focuser moving to 16922
[07/17/20 02:36:36.524][DEBUG][Camera Thread][SQ;AF;] ASCOM Focuser: Disable focuser temp comp for move
[07/17/20 02:36:36.525][DEBUG][Camera Thread][SQ;AF;] ASCOM Focuser: Temp comp is avaialble, setting to False
[07/17/20 02:36:36.649][DEBUG][Camera Thread][SQ;AF;] Focuser move call complete
[07/17/20 02:36:36.650][DEBUG][Move Monitor Thread][SQ;AF;] ASCOM Focuser: Move monitor thread is started…
[07/17/20 02:36:39.700][DEBUG][Move Monitor Thread][SQ;AF;] ASCOM Focuser: Move monitor thread -> movement complete
[07/17/20 02:36:39.700][DEBUG][Move Monitor Thread][SQ;AF;] ASCOM Focuser: Re-enable temp comp on movement complete
[07/17/20 02:36:39.700][DEBUG][Move Monitor Thread][SQ;AF;] ASCOM Focuser: Temp comp is avaialble, setting to True
[07/17/20 02:38:36.830][DEBUG][Camera Thread][SQ;AF;] ASCOM Focuser: Timeout! Focuser trying to get to 16922, reports it is at 16772.
Focuser move complete reports: True
[07/17/20 02:38:36.830][DEBUG][Camera Thread][SQ;AF;] MoveFocuserAbs: End, move complete, at 16772…
[07/17/20 02:38:36.831][ERROR][Camera Thread][SQ;AF;] Error in auto focus! Focuser failed to move to the requested position (16922).
Focuser reports it is at 16772. : Error in auto focus! Focuser failed to move
to the requested position (16922). Focuser reports it is at 16772.
at qr.a(AutoFocusData A_0, sz& A_1, sz[] A_2)

Charlie