Titan one DS4 power manage macro?
4 posts
• Page 1 of 1
-
Ron-Short - Sergeant First Class
- Posts: 17
- Joined: Wed Oct 21, 2015 2:47 am
Re: Titan one DS4 power manage macro?
Yes, it is possible. There is a function that can be used called "get_battery()". It returns a value of 1-10 that represents the batter level - i.e. 1 = 10%, 5 = 50% and 10 = 100%. You can also change the colors of the lightbar.
get_battery documentation
http://www.consoletuner.com/kbase/misc_functions_and_constants.htm#get_battery
PS4 Light Bar script example
http://www.consoletuner.com/gpclib/?s=958
Example script that I created to show how you can use get_battery(). If battery is >= 80% level, the lightbar will be green. If <= 20% battery level, the lightbar will be red. If the battery level is between 20-80%, the lightbar will be blue.
get_battery documentation
http://www.consoletuner.com/kbase/misc_functions_and_constants.htm#get_battery
PS4 Light Bar script example
http://www.consoletuner.com/gpclib/?s=958
Example script that I created to show how you can use get_battery(). If battery is >= 80% level, the lightbar will be green. If <= 20% battery level, the lightbar will be red. If the battery level is between 20-80%, the lightbar will be blue.
- Code: Select all
main {
if( get_battery() >= 8 ) { // greater than or equal to 80% battery
// green
set_led(LED_1, 0);
set_led(LED_2, 0);
set_led(LED_3, 1);
set_led(LED_4, 0);
}
if( get_battery() <= 2 ) { // less than or equal to 20% battery
// red
set_led(LED_1, 0);
set_led(LED_2, 1);
set_led(LED_3, 0);
set_led(LED_4, 0);
}
if( get_battery() > 2 && get_battery() <8 ) { // between 20 and 80% battery
// blue
set_led(LED_1, 1);
set_led(LED_2, 0);
set_led(LED_3, 0);
set_led(LED_4, 0);
}
}
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
Re: Titan one DS4 power manage macro?
thanks! this works
-
Ron-Short - Sergeant First Class
- Posts: 17
- Joined: Wed Oct 21, 2015 2:47 am
Re: Titan one DS4 power manage macro?
You're welcome. Thank you for testing.
-
UK_Wildcats - Brigadier General
- Posts: 2243
- Joined: Thu Jan 08, 2015 6:53 pm
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: astrals and 105 guests