Compare commits

...

12 Commits

Author SHA1 Message Date
970c8998f0 prep v4.1.0
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-06-14 06:16:17 +02:00
8a87d83653 Merge pull request 'Add more heater commands' (#200) from add-heater-cmd-ids into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #200
2023-06-14 06:06:58 +02:00
cf55b3630c add set cfg and rst cfg
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-06-14 05:16:21 +02:00
656e75052b fix broken IDs
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-06-14 02:59:20 +02:00
e91bf01daf add heater cmd IDs
All checks were successful
EIVE/-/pipeline/head This commit looks good
2023-06-14 02:03:20 +02:00
eae0120643 Merge pull request 'switched to prebuilt docker image' (#198) from mohr/docker into main
All checks were successful
EIVE/-/pipeline/head This commit looks good
Reviewed-on: #198
2023-06-11 13:36:27 +02:00
fc3cf480dc bump docker version
All checks were successful
EIVE/-/pipeline/pr-main This commit looks good
2023-06-11 12:14:52 +02:00
acca981260 jenkins user in docker
Some checks failed
EIVE/-/pipeline/pr-main There was a failure building this commit
2023-06-11 12:12:47 +02:00
822eaa4c89 removed empty environment block in Jenkinsfile which Jenkins does not like
Some checks failed
EIVE/-/pipeline/pr-main There was a failure building this commit
diva....
2023-06-11 12:01:26 +02:00
252d140b8e switched to prebuilt docker image
Some checks failed
EIVE/-/pipeline/pr-main There was a failure building this commit
2023-06-11 11:56:39 +02:00
4a990e704b added basic automation file
Some checks failed
EIVE/-/pipeline/head There was a failure building this commit
2023-06-10 14:58:15 +02:00
522f273c99 add date in changelog 2023-06-10 14:48:02 +02:00
5 changed files with 70 additions and 4 deletions

View File

@ -10,7 +10,13 @@ list yields a list of all related PRs for each release.
# [unreleased]
# [v4.0.0] to be released
# [v4.1.0] 2023-06-14
## Added
- Some BPX battery commands
# [v4.0.0] 2023-06-10
`tmtccmd` version: v5.0.0rc0

9
automation/Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM python:3
RUN apt-get update
RUN apt-get --yes upgrade
#tzdata is a dependency, won't install otherwise
ARG DEBIAN_FRONTEND=noninteractive
#pip needs a valid user to work
RUN adduser --uid 114 jenkins

14
automation/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,14 @@
pipeline {
agent {
docker {
image 'eive-tmtc-ci:d2'
}
}
stages {
stage('Package') {
steps {
sh 'pip install .'
}
}
}
}

View File

@ -1,11 +1,11 @@
__version__ = "4.0.0"
__version__ = "4.1.0"
import logging
from pathlib import Path
SW_NAME = "eive-tmtc"
VERSION_MAJOR = 4
VERSION_MINOR = 0
VERSION_MINOR = 1
VERSION_REVISION = 0
EIVE_TMTC_ROOT = Path(__file__).parent

View File

@ -28,14 +28,24 @@ class BpxSetId(enum.IntEnum):
class BpxActionId:
REBOOT = 2
RESET_COUNTERS = 3
SET_CFG = 4
CONFIG_CMD = 4
GET_CFG = 5
SET_CFG = 6
MAN_HEATER_ON = 10
MAN_HEATER_OFF = 11
class BpxHeaterModeSelect(enum.IntEnum):
OFF = 0
AUTO = 1
class BpxOpCode:
HK = ["0", "hk"]
OFF = ["off"]
ON = ["on"]
RST_CFG = "reset_cfg"
SET_CFG = "set_cfg"
RST_BOOT_CNT = ["1", "rst_boot_cnt"]
REQUEST_CFG = ["2", "cfg"]
REQUEST_CFG_HK = ["3", "cfg_hk"]
@ -49,6 +59,8 @@ def add_bpx_cmd_definitions(defs: TmtcDefinitionWrapper):
oce.add(keys=BpxOpCode.OFF, info="Off command")
oce.add(keys=BpxOpCode.HK, info="Request BPX HK")
oce.add(keys=BpxOpCode.RST_BOOT_CNT, info="Reset Boot Count")
oce.add(keys=BpxOpCode.RST_CFG, info="Reset Config")
oce.add(keys=BpxOpCode.SET_CFG, info="Set BPX configuration")
oce.add(keys=BpxOpCode.REQUEST_CFG, info="Request Configuration Struct (Step 1)")
oce.add(
keys=BpxOpCode.REQUEST_CFG_HK, info="Request Configuration Struct HK (Step 2)"
@ -96,6 +108,31 @@ def pack_bpx_commands(p: ServiceProviderParams):
object_id=BPX_HANDLER_ID, action_id=BpxActionId.RESET_COUNTERS
)
)
if op_code == BpxOpCode.RST_CFG:
q.add_log_cmd("Reset BPX configuration")
q.add_pus_tc(
create_action_cmd(
object_id=BPX_HANDLER_ID, action_id=BpxActionId.CONFIG_CMD
)
)
if op_code == BpxOpCode.SET_CFG:
q.add_log_cmd("Setting BPX configuration")
user_data = bytearray()
batt_mode = BpxHeaterModeSelect(
int(input("BPX heater mode select, 0 for OFF 1 for AUTO: "))
)
user_data.append(batt_mode)
lower_limit = int(input("Lower heater limit (-2 default): "))
user_data.append(struct.pack("!b", lower_limit)[0])
upper_limit = int(input("Upper heater limit (3 default): "))
user_data.append(struct.pack("!b", upper_limit)[0])
q.add_pus_tc(
create_action_cmd(
object_id=BPX_HANDLER_ID,
action_id=BpxActionId.SET_CFG,
user_data=user_data,
)
)
if op_code in BpxOpCode.REQUEST_CFG:
q.add_log_cmd("Requesting configuration struct")
q.add_pus_tc(