Now it's working, both red alert and sound. Thanks.
While on the line.....
Is it suitable to discuss the timer function for the Deadman?
The timer restarts if I move the mouse over the chart but also when the boat is still and the chart moves on screen
, F2 - Auto follow mode. I think I understand the logic. You reset the timer when this function is called:
void watchdog_pi::SetCursorLatLon(double lat, double lon)
m_cursor_lat = lat;
m_cursor_lon = lon;
m_cursor_time = wxDateTime::Now();
And it's called from OCPN every time the cursor has a new position. In F2 mode when cursor is moved over the OCPN screen edge the last position is saved as some kind of "edge" point. Now when the chart is moving there will be a new position for that edge point and the SetCursorLatLon is called and "our" timer is reset.
I agree this way of a moving cursor detection is efficient and smart to not build the wheel
again since it was already there.
But for me the Deadman now has limited use since I mostly use the F2 function. Of course I could stop using F2 if I'm close to falling in sleep, but if I've that focus I'm probably not risky tired?
Is there another way for me to "fool" the plugin then to undo F2-mode?
Or could we discuss why OCPN needs a new cursor position when it's outside the edge, a fresh one is achieved as soon the cursor is within the edge again?