Skip to content

Commit

Permalink
Fix for MCP23017 Pump Output
Browse files Browse the repository at this point in the history
  • Loading branch information
kizniche committed Jun 11, 2024
1 parent 9f5566e commit 5a0a7fe
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions mycodo/outputs/pump_mcp23017.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,7 @@ def initialize(self):
for channel in channels_dict:
try:
self.currently_dispensing[channel] = False
self.output_states[channel] = False
if self.options_channels['state_startup'][channel] == 1:
self.turn_on_off(channel, "on")
elif self.options_channels['state_startup'][channel] == 0:
self.turn_on_off(channel, "off")
else: # Default state: Off
self.turn_on_off(channel, "off")
self.turn_on_off(channel, "off")
except:
self.logger.exception("Initializing startup state")
return
Expand Down Expand Up @@ -313,9 +307,6 @@ def output_switch(self, state, output_type=None, amount=None, output_channel=Non
self.logger.error("Amount cannot be less than 0")
return

if output_channel not in self.currently_dispensing:
self.currently_dispensing[output_channel] = False

self.logger.debug(f"state: {state}, output_type: {output_type}, amount: {amount}")

if state == 'off':
Expand Down

1 comment on commit 5a0a7fe

@kizniche
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Radical DIY Forum. There might be relevant details there:

https://forum.radicaldiy.com/t/need-help-configuring-mcp23017-for-peristaltic-pumps-in-mycodo/1879/11

Please sign in to comment.