-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
596 additions
and
24 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[package] | ||
name = "wall_disp" | ||
name = "desktopper" | ||
version = "0.1.0" | ||
authors = ["Jackson <[email protected]>"] | ||
edition = "2018" | ||
|
@@ -19,6 +19,11 @@ log = "^0.4" | |
pretty_env_logger = "^0.4" | ||
signal-hook = {version = "0.1.15", features = ["tokio-support"]} | ||
openssl-sys = "*" | ||
gpio_lcd = {git = "https://github.com/jrmo14/gpio_lcd"} | ||
clap = "2.33.1" | ||
gpio-cdev = "0.3.0" | ||
nix = "0.17.0" | ||
anyhow = "1.0.31" | ||
|
||
[features] | ||
vendored = ["openssl-sys/vendored"] | ||
|
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,20 @@ | ||
# TODO Change to release | ||
[tasks.build_pi] | ||
description = "Build the project for the raspberry pi" | ||
command = "cargo" | ||
args = ["build", "--target=armv7-unknown-linux-gnueabihf", "--features=vendored"] | ||
|
||
[tasks.deploy] | ||
description = "Deploys the project to the raspberry pi" | ||
dependencies = ["build_pi"] | ||
script = [ | ||
"echo Creating Zip File", | ||
"zip -r desktopper.zip resources/ target/armv7-unknown-linux-gnueabihf/debug/desktopper target/armv7-unknown-linux-gnueabihf/debug/api_server", | ||
"echo Copying zip file", | ||
"scp desktopper.zip pi@desktopper:~/", | ||
"echo Installing on target", | ||
"ssh pi@desktopper \"unzip desktopper.zip -d desktopper;cd desktopper/resources; chmod +x target_deploy.sh; sudo ./target_deploy.sh; cd ~; rm -rf desktopper*\"", | ||
"echo Cleaning up", | ||
"rm -f desktopper.zip" | ||
] | ||
|
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,12 @@ | ||
[Unit] | ||
Description=Desktop Task monitor/display | ||
|
||
[Service] | ||
# The dummy program will exit | ||
Type=oneshot | ||
ExecStart=/bin/true | ||
# Keep this around after the dummy exits | ||
RemainAfterExit=yes | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
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,13 @@ | ||
[Unit] | ||
Description=Display and interaction controller for Desktopper | ||
PartOf=desktopper.service | ||
After=desktopper.service | ||
After=task_api.service | ||
|
||
[Service] | ||
ExecStart=/usr/local/bin/desktopper --rs 14 --enable 15 --data_pins 6 13 19 26 255 255 255 255 -f --cycle_button 17 --mode_button 27 --fn_button_0 22 --fn_button_1 23 --fn_button_2 24 | ||
Restart=on-failure | ||
|
||
[Install] | ||
WantedBy=desktopper.service | ||
|
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,12 @@ | ||
[Unit] | ||
Description=Webserver hosting task api | ||
PartOf=desktopper.service | ||
After=desktopper.service | ||
|
||
[Service] | ||
# Start the component | ||
ExecStart=/usr/local/bin/api_server | ||
Restart=on-failure | ||
|
||
[Install] | ||
WantedBy=desktopper.service |
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,7 @@ | ||
BIN_DIR=../target/armv7-unknown-linux-gnueabihf/debug | ||
mv systemd_files/* /etc/systemd/system/ | ||
mv $BIN_DIR/api_server /usr/local/bin/ | ||
mv $BIN_DIR/desktopper /usr/local/bin/ | ||
systemctl daemon-reload | ||
systemctl enable desktopper task_api desktopper_display | ||
systemctl start desktopper |
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
Oops, something went wrong.