diff --git a/install.sh b/install.sh index fc76d81..47f1373 100755 --- a/install.sh +++ b/install.sh @@ -189,13 +189,21 @@ else fi ### Install medet_arm -if [ -e /usr/bin/medet_arm ]; then - log_done "medet_arm was already installed" +if [ -e /usr/bin/medet ]; then + log_done "medet was already installed" else - log_running "Installing medet_arm..." - sudo cp software/medet_arm /usr/bin/medet_arm - sudo chmod +x /usr/bin/medet_arm - log_done "medet_arm installed" + if [[ $(uname -m) == *"arm"* ]]; then + log_running "Installing medet_arm..." + sudo cp software/medet_arm /usr/bin/medet + elif [[ $(uname -m) == *"x86_64"* ]]; then + log_running "Installing medet_x86_64..." + sudo cp software/medet_x86_64 /usr/bin/medet + else + log_error "Unknown archictecture $(uname -m)!" + exit -1 + fi + sudo chmod +x /usr/bin/medet + log_done "medet installed" fi ### Cron the scheduler diff --git a/receive_meteor.sh b/receive_meteor.sh index 6099533..89ea35f 100755 --- a/receive_meteor.sh +++ b/receive_meteor.sh @@ -64,7 +64,7 @@ fi log "Decoding in progress (QPSK to BMP)" "INFO" [ $1 = "METEOR-M2 2"] && medet_extra="-diff" -medet_arm $medet_extra "${METEOR_OUTPUT}/${3}.qpsk" "${METEOR_OUTPUT}/${3}" -cd +medet $medet_extra "${METEOR_OUTPUT}/${3}.qpsk" "${METEOR_OUTPUT}/${3}" -cd rm "${METEOR_OUTPUT}/${3}.qpsk" @@ -72,11 +72,11 @@ if [ -f "${METEOR_OUTPUT}/${3}.dec" ]; then if [ "${SUN_ELEV}" -lt "${SUN_MIN_ELEV}" ]; then log "I got a successful ${3}.dec file. Decoding APID 68" "INFO" - medet_arm "${METEOR_OUTPUT}/${3}.dec" "${NOAA_OUTPUT}/images/${3}-122" -r 68 -g 68 -b 68 -d + medet "${METEOR_OUTPUT}/${3}.dec" "${NOAA_OUTPUT}/images/${3}-122" -r 68 -g 68 -b 68 -d /usr/bin/convert $FLIP -negate "${NOAA_OUTPUT}/images/${3}-122.bmp" "${NOAA_OUTPUT}/images/${3}-122.bmp" else log "I got a successful ${3}.dec file. Creating false color image" "INFO" - medet_arm "${METEOR_OUTPUT}/${3}.dec" "${NOAA_OUTPUT}/images/${3}-122" -r 65 -g 65 -b 64 -d + medet "${METEOR_OUTPUT}/${3}.dec" "${NOAA_OUTPUT}/images/${3}-122" -r 65 -g 65 -b 64 -d fi log "Rectifying image to adjust aspect ratio" "INFO" diff --git a/software/medet_x86_64 b/software/medet_x86_64 new file mode 100755 index 0000000..f5cba3e Binary files /dev/null and b/software/medet_x86_64 differ