18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-13 12:20:51 +01:00

fix(ai): release horn when human driver takes over from AI

This commit is contained in:
jerrrrycho
2026-10-16 13:10:50 +02:00
parent 05ffb9058c
commit ccb973e049
24 changed files with 8090 additions and 83 deletions

24
vehicle/horn.h Normal file
View File

@@ -0,0 +1,24 @@
/*
This Source Code Form is subject to the
terms of the Mozilla Public License, v.
2.0. If a copy of the MPL was not
distributed with this file, You can
obtain one at
http://mozilla.org/MPL/2.0/.
*/
#pragma once
// the horn controls of the cab, on the WarningSignal bits of the vehicle (1: low tone, 2: high tone)
namespace horn {
int const low{1};
int const high{2};
// the signal after the key or button of the Tone is pressed. a single lever for both tones, without
// separate buttons for them, can't sound both tones at once
int pressed(int Signal, int Tone, bool Singlelever);
// the signal after the key or button of the Tone is released
int released(int Signal, int Tone);
} // namespace horn