-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Cedar Detect / Solve and Solidify Align (#256)
* Starting cedar update, align code changed * Cedar detect update * Cedar detect update - RPI version * Switching to selective migrations * Add submodule migration * switch check for files * working on conditionals * Recompile on rpi4 * Use cedar-solve 0.5.1 * Remove debug prints * Working on mypy failure * Update to proper tetra3 * Update for mypy * Maybe working now? * Remove symlink * Update tetra3 version * Simplify tetra3 update * Simplify tetra3 update * Ignore imu on alignment screen, adjust menu, clean up debug * Fix reticle position after alignment
- Loading branch information
Showing
13 changed files
with
128 additions
and
138 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
[submodule "python/PiFinder/tetra3"] | ||
path = python/PiFinder/tetra3 | ||
url = https://github.com/esa/tetra3.git | ||
branch = no_big_files | ||
url = https://github.com/smroid/cedar-solve |
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
Binary file not shown.
Binary file not shown.
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,48 @@ | ||
# GPSD | ||
sudo apt install -y gpsd | ||
sudo dpkg-reconfigure -plow gpsd | ||
sudo cp ~/PiFinder/pi_config_files/gpsd.conf /etc/default/gpsd | ||
|
||
# PWM | ||
sudo sed -zi '/dtoverlay=pwm,pin=13,func=4\n/!s/$/\ndtoverlay=pwm,pin=13,func=4\n/' /boot/config.txt | ||
|
||
# Uart for GPS | ||
sudo sed -zi '/dtoverlay=uart3\n/!s/$/\ndtoverlay=uart3\n/' /boot/config.txt | ||
|
||
# Migrate DB | ||
if [ -f "/home/pifinder/PiFinder/astro_data/observations.db" ] | ||
then | ||
echo "Migrating astro_data DB" | ||
python -c "from PiFinder import setup;setup.create_logging_tables();" | ||
sqlite3 < /home/pifinder/PiFinder/migrate_db.sql | ||
rm /home/pifinder/PiFinder/astro_data/observations.db | ||
fi | ||
|
||
# Migrate Config files | ||
if ! [ -f "/home/pifinder/PiFinder_data/config.json" ] | ||
then | ||
echo "Migrating config.json" | ||
mv /home/pifinder/PiFinder/config.json /home/pifinder/PiFinder_data/config.json | ||
fi | ||
|
||
# Adjust service definition | ||
sudo systemctl disable pifinder | ||
sudo rm /etc/systemd/system/pifinder.service | ||
sudo cp /home/pifinder/PiFinder/pi_config_files/pifinder.service /lib/systemd/system/pifinder.service | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable pifinder | ||
|
||
# add PiFinder_splash if not already in place | ||
if ! [ -f "/lib/systemd/system/pifinder_spash.service" ] | ||
then | ||
sudo cp /home/pifinder/PiFinder/pi_config_files/pifinder_splash.service /lib/systemd/system/pifinder_splash.service | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable pifinder_splash | ||
fi | ||
|
||
# open permissisons on wpa_supplicant file so we can adjust network config | ||
sudo chmod 666 /etc/wpa_supplicant/wpa_supplicant.conf | ||
|
||
# DONE | ||
echo "Post Update Complete" | ||
|
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 @@ | ||
# swap tetra3 submodule | ||
git submodule sync | ||
git submodule update --init --recursive | ||
|
||
# Set up symlink | ||
ln -s /home/pifinder/PiFinder/python/PiFinder/tetra3/tetra3 /home/pifinder/PiFinder/python/tetra3 | ||
|
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,51 +1,28 @@ | ||
git submodule update --init --recursive | ||
sudo pip install -r /home/pifinder/PiFinder/python/requirements.txt | ||
|
||
# GPSD | ||
sudo apt install -y gpsd | ||
sudo dpkg-reconfigure -plow gpsd | ||
sudo cp ~/PiFinder/pi_config_files/gpsd.conf /etc/default/gpsd | ||
|
||
# PWM | ||
sudo sed -zi '/dtoverlay=pwm,pin=13,func=4\n/!s/$/\ndtoverlay=pwm,pin=13,func=4\n/' /boot/config.txt | ||
|
||
# Uart for GPS | ||
sudo sed -zi '/dtoverlay=uart3\n/!s/$/\ndtoverlay=uart3\n/' /boot/config.txt | ||
|
||
# Migrate DB | ||
if [ -f "/home/pifinder/PiFinder/astro_data/observations.db" ] | ||
# Set up migrations folder if it does not exist | ||
if ! [ -d "/home/pifinder/PiFinder_data/migrations" ] | ||
then | ||
echo "Migrating astro_data DB" | ||
python -c "from PiFinder import setup;setup.create_logging_tables();" | ||
sqlite3 < /home/pifinder/PiFinder/migrate_db.sql | ||
rm /home/pifinder/PiFinder/astro_data/observations.db | ||
mkdir /home/pifinder/PiFinder_data/migrations | ||
fi | ||
|
||
# Migrate Config files | ||
if ! [ -f "/home/pifinder/PiFinder_data/config.json" ] | ||
# v1.x.x | ||
# everying prior to selecitve migrations | ||
if ! [ -f "/home/pifinder/PiFinder_data/migrations/v1.x.x" ] | ||
then | ||
echo "Migrating config.json" | ||
mv /home/pifinder/PiFinder/config.json /home/pifinder/PiFinder_data/config.json | ||
source /home/pifinder/PiFinder/migration_source/v1.x.x.sh | ||
touch /home/pifinder/PiFinder_data/migrations/v1.x.x | ||
fi | ||
|
||
# Adjust service definition | ||
sudo systemctl disable pifinder | ||
sudo rm /etc/systemd/system/pifinder.service | ||
sudo cp /home/pifinder/PiFinder/pi_config_files/pifinder.service /lib/systemd/system/pifinder.service | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable pifinder | ||
|
||
# add PiFinder_splash if not already in place | ||
if ! [ -f "/lib/systemd/system/pifinder_spash.service" ] | ||
# v2.1.0 | ||
# Switch to Cedar | ||
if ! [ -f "/home/pifinder/PiFinder_data/migrations/v2.1.0" ] | ||
then | ||
sudo cp /home/pifinder/PiFinder/pi_config_files/pifinder_splash.service /lib/systemd/system/pifinder_splash.service | ||
sudo systemctl daemon-reload | ||
sudo systemctl enable pifinder_splash | ||
source /home/pifinder/PiFinder/migration_source/v2.1.0.sh | ||
touch /home/pifinder/PiFinder_data/migrations/v2.1.0 | ||
fi | ||
|
||
# open permissisons on wpa_supplicant file so we can adjust network config | ||
sudo chmod 666 /etc/wpa_supplicant/wpa_supplicant.conf | ||
|
||
# DONE | ||
echo "Post Update Complete" | ||
|
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
Submodule tetra3
updated
41 files
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.