-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added FA-18C Hornet backlight control
- Loading branch information
1 parent
7e728d1
commit bb0eec3
Showing
4 changed files
with
61 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/*------------------------------------------------------------------------------- | ||
-- | ||
-- fa-18c_hornet_led_utils.tmh | ||
-- | ||
-- Use at own risk without warranty. | ||
-- | ||
-- F/A-18C Hornet specific utility functions to program the state of LEDs | ||
-- on Thrustmaster Warthog Throttle. | ||
-- | ||
-- Author: slughead | ||
-- Date: 2/12/2023 | ||
-- | ||
------------------------------------------------------------------------------*/ | ||
|
||
//include "warthog_defines.tmh" | ||
//include "warthog_utils.tmh" | ||
|
||
int set_fa_18c_hornet_led_status( alias led_states ) | ||
{ | ||
int speed_brake_position = char_to_int(led_states[1]); | ||
int console_light = char_to_int(led_states[2]); | ||
|
||
if (&Throttle != &joy0) | ||
{ | ||
set_fa_18c_speed_brake_leds( speed_brake_position ); | ||
set_fa_18c_hornet_backlight( console_light) ; | ||
} | ||
} | ||
|
||
int set_fa_18c_speed_brake_leds(int speed_brake_position) | ||
{ | ||
if (&Throttle != &joy0) | ||
{ | ||
set_led(&Throttle, get_tm_warthog_led_id( WH_LED1 ), (speed_brake_position >= 1)); | ||
set_led(&Throttle, get_tm_warthog_led_id( WH_LED2 ), (speed_brake_position >= 2)); | ||
set_led(&Throttle, get_tm_warthog_led_id( WH_LED3 ), (speed_brake_position >= 3)); | ||
set_led(&Throttle, get_tm_warthog_led_id( WH_LED4 ), (speed_brake_position >= 4)); | ||
set_led(&Throttle, get_tm_warthog_led_id( WH_LED5 ), (speed_brake_position >= 5)); | ||
} | ||
} | ||
|
||
int set_fa_18c_hornet_backlight( int intensity ) | ||
{ | ||
set_backlight( intensity ); | ||
//ActKey(PULSE+KEYON+LED(&Throttle, LED_INTENSITY, intensity * 51)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters