diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7676ab7..8677a92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,8 +86,7 @@ jobs: run: | echo "Using image ${{ env.FSW_IMG }}" ./run.sh build --clean - DOWNLINK_TARGET_PORT=50051 UPLINK_TARGET_PORT=50001 ./run.sh gds& disown - DOWNLINK_TARGET_PORT=50051 UPLINK_TARGET_PORT=50001 ./run.sh exec --local + DOWNLINK_TARGET_PORT=50051 UPLINK_TARGET_PORT=50001 ./run.sh exec --local --daemon ./run.sh teardown - name: Upload artifacts diff --git a/FlightComputer/Top/instances.fpp b/FlightComputer/Top/instances.fpp index 2834ef1..f1f2035 100644 --- a/FlightComputer/Top/instances.fpp +++ b/FlightComputer/Top/instances.fpp @@ -63,7 +63,7 @@ module FlightComputer { instance pingRcvr: FlightComputer.PingReceiver base id 0x0A00 \ queue size Default.queueSize \ stack size Default.stackSize \ - priority 100 + priority 99 instance eventLogger: Svc.ActiveLogger base id 0x0B00 \ queue size Default.queueSize \ diff --git a/docker-compose.yml b/docker-compose.yml index a5c2912..ce4a100 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: gds: - stop_grace_period: 1s + stop_grace_period: 3s user: user build: context: . @@ -10,6 +10,7 @@ services: - HOST_GID=${HOST_GID:-1000} - progress=plain image: $FSW_IMG + command: "fprime-gds -n --ip-port=$UPLINK_TARGET_PORT --tts-port=$DOWNLINK_TARGET_PORT --dictionary ./dict/FlightComputerTopologyAppDictionary.xml" working_dir: ${DEPLOYMENT_ROOT}/build-artifacts/Linux/FlightComputer/ ports: - $GDB_PORT:5555 @@ -24,7 +25,7 @@ services: interval: 2s timeout: 3s retries: 25 - start_period: 5s + start_period: 3s fsw: stop_grace_period: 1s user: user @@ -66,3 +67,7 @@ services: timeout: 3s retries: 25 start_period: 5s + depends_on: + gds: + condition: service_healthy + restart: true diff --git a/run.sh b/run.sh index 80aba35..7184ad8 100755 --- a/run.sh +++ b/run.sh @@ -268,6 +268,11 @@ case $1 in else FLAGS="${FLAGS} -w /MBSE_FSW/deploy/ --no-deps" RUN_CMD="docker compose run --rm -it fsw python3 fswCtrl.py" + FLAGS="${FLAGS} --no-deps" + fi + + if [ "${DAEMON}" -eq "1" ]; then + FLAGS="${FLAGS} -d" fi RUN_CMD="${RUN_CMD} ./FlightComputer -a ${GDS_IP} -u ${UPLINK_TARGET_PORT} -d ${DOWNLINK_TARGET_PORT}" @@ -291,11 +296,23 @@ case $1 in check_port ${DOWNLINK_TARGET_PORT} check_port ${UPLINK_TARGET_PORT} + FLAGS="-it --rm" + if [ "${DAEMON}" -eq "1" ]; then + FLAGS="-i -d" + fi + FLAGS="-w ${BIN_DIR}" + CMD="fprime-gds -n --ip-port=$UPLINK_TARGET_PORT --tts-port=$DOWNLINK_TARGET_PORT --dictionary ./dict/FlightComputerTopologyAppDictionary.xml" CMD="docker compose run -it --rm gds $CMD" echo $CMD eval $CMD ;; + "smoke-test") + CMD="fprime-util visualize --working-dir $FSW_WDIR/public" + CMD="docker compose run -it --rm -w $DEPLOYMENT_ROOT/Top fsw $CMD" + echo $CMD + eval $CMD + ;; "topology") CMD="fprime-util visualize --working-dir $FSW_WDIR/public" CMD="docker compose run -it --rm -w $DEPLOYMENT_ROOT/Top fsw $CMD"