-
Notifications
You must be signed in to change notification settings - Fork 11
/
flightConfig.c
29 lines (26 loc) · 1.14 KB
/
flightConfig.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>
#include <stdlib.h>
char cammand0 [] = "sudo crontab -l >> crontab_new ; echo @reboot sudo /usr/bin/tvservice -o >> crontab_new ; sudo crontab crontab_new ; rm crontab_new";
char cammand1 [] = "sudo cat /boot/config.txt >> config_temp ; sudo echo dtparam=act_led_trigger=none >> config_temp";
char cammand2 [] = "sudo echo dtparam=act_led_activelow=on >> config_temp ";
char cammand3 [] = "sudo echo dtoverlay=disable-wifi >> config_temp";
char cammand4 [] = "sudo echo dtoverlay=disable-bt >> config_temp";
char cammand5 [] = "sudo cp config_temp /boot/config.txt ; rm config_temp";
/*************************************************************************
* This is the code that will set the pi into the power saving options we
* want to use.
* NOTE: This dispable wifi as well, this is the finial flight
* configuration
************************************************************************/
void main()
{
system(cammand0);
system(cammand1);
system(cammand2);
system(cammand3);
system(cammand4);
system(cammand5);
system("sudo reboot");
}
//this code will update all the code bases
//Written by Shawn