Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch core-anup into test #2

Merged
merged 19 commits into from
Apr 25, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix merge
  • Loading branch information
abagali1 committed Mar 28, 2019
commit ca86bd1f5d22cd4d1d6564b6cc4e4e9c8a6b3914
9 changes: 6 additions & 3 deletions submodules/eps.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ def pin_on(device_name):
logger.error("Pin is already ON.") # FIXME should say pin_on was successful, not pin was already on
return True
else: # FIXME s how if pin_on was unsuccessful in turning on the device
logger.debug("Pin communication successful. \
Pin is now ON.")
if get_PDM_status(device_name) == 1: # PDM is ON
logger.error("Pin is already ON.")
else:
logger.debug("Pin communication successful. \
Pin is now ON.")


def reboot_device(device_name, sleeptime):
Expand All @@ -43,7 +46,7 @@ def pin_off(device_name):
Pin is now OFF.")


def get_pdm_status(device_name):
def get_PDM_status(device_name):
with SMBusWrapper(1) as bus:
PDM_val = [epsdict[device_name]]
bus.write_i2c_block_data(address, 0x0E, PDM_val)
Expand Down
4 changes: 4 additions & 0 deletions submodules/gps.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def getsinglegps():
return gpsdata
else:
return None #FIXME MAYBE CHANGE TO ACTUAL VAL

# end pseudo


Expand Down Expand Up @@ -312,6 +313,7 @@ def get_points(period):
telemetry_send(error_packet) #FIXME A PACKET THAT SHOWS THAT THE EPS WAS UNABLE TO TURN ON THE GPS



def get_cache():
return cache

Expand Down Expand Up @@ -380,6 +382,7 @@ def telemetry_send(gps_packet):
packet += base64.b64encode(struct.pack('d', t)).decode("UTF-8")
packet += base64.b64encode(struct.pack('fff', float(lat),
float(lon), float(alt))).decode("UTF-8")

telemetry.enqueue_submodule_packet(packet)


Expand Down Expand Up @@ -437,6 +440,7 @@ def enter_normal_mode():
if not is_simulate('gps'):
pass
eps.pin_on("gps") #TODO: BE ABLE TO FORCE EPS TO TURN ON GPS?

start_loop()


Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.