Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #108 from Panduza/107-use-case-for-the-demo
Browse files Browse the repository at this point in the history
use case for the demo
  • Loading branch information
Lucas-D20 authored Jul 30, 2024
2 parents 95101fb + ebdf4ce commit fd5b778
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 59 deletions.
32 changes: 16 additions & 16 deletions panduza/interfaces/blc.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ def __post_init__(self):
RwField( name_ = "value" )
)

# === ANALOG MODULATION ===
self.add_attribute(
Attribute( name_= "analog_modulation")
).add_field(
RwField( name_= "value")
)
# # === ANALOG MODULATION ===
# self.add_attribute(
# Attribute( name_= "analog_modulation")
# ).add_field(
# RwField( name_= "value")
# )


# === POWER ===
Expand Down Expand Up @@ -91,19 +91,19 @@ def turn_off(self):
def is_on(self):
return self.enable.value.get()

############################################################
#################### ANALOG MODULATION #####################
############################################################
# ############################################################
# #################### ANALOG MODULATION #####################
# ############################################################

# Enable value need to be true or false to actually do something
def enable_analog_modulation(self):
self.analog_modulation.value.set(True)
# # Enable value need to be true or false to actually do something
# def enable_analog_modulation(self):
# self.analog_modulation.value.set(True)

def disable_analog_modulation(self):
self.analog_modulation.value.set(False)
# def disable_analog_modulation(self):
# self.analog_modulation.value.set(False)

def get_analog_modulation(self):
return self.analog_modulation.value.get()
# def get_analog_modulation(self):
# return self.analog_modulation.value.get()

############################################################
########################## MODE ############################
Expand Down
86 changes: 43 additions & 43 deletions panduza/interfaces/bpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,39 +29,39 @@ def __post_init__(self):
RwField( name_ = "value" )
)

# === VOLTAGE ===
self.add_attribute(
Attribute( name_ = "voltage" )
).add_field(
RoField( name_ = "real" )
).add_field(
RwField( name_ = "value" )
).add_field(
RoField( name_ = "min" )
).add_field(
RoField( name_ = "max" )
).add_field(
RoField( name_ = "decimals" )
).add_field(
RwField( name_ = "polling_cycle" )
)

# === CURRENT ===
self.add_attribute(
Attribute( name_ = "current" )
).add_field(
RoField( name_ = "real" )
).add_field(
RwField( name_ = "value" )
).add_field(
RoField( name_ = "min" )
).add_field(
RoField( name_ = "max" )
).add_field(
RoField( name_ = "decimals" )
).add_field(
RwField( name_ = "polling_cycle" )
)
# # === VOLTAGE ===
# self.add_attribute(
# Attribute( name_ = "voltage" )
# ).add_field(
# RoField( name_ = "real" )
# ).add_field(
# RwField( name_ = "value" )
# ).add_field(
# RoField( name_ = "min" )
# ).add_field(
# RoField( name_ = "max" )
# ).add_field(
# RoField( name_ = "decimals" )
# ).add_field(
# RwField( name_ = "polling_cycle" )
# )

# # === CURRENT ===
# self.add_attribute(
# Attribute( name_ = "current" )
# ).add_field(
# RoField( name_ = "real" )
# ).add_field(
# RwField( name_ = "value" )
# ).add_field(
# RoField( name_ = "min" )
# ).add_field(
# RoField( name_ = "max" )
# ).add_field(
# RoField( name_ = "decimals" )
# ).add_field(
# RwField( name_ = "polling_cycle" )
# )

# === SETTINGS ===
self.add_attribute(
Expand Down Expand Up @@ -97,16 +97,16 @@ def turn_off(self):
def is_on(self):
return self.enable.value.get()

# Voltage get/set
def set_voltage_value(self, value):
self.voltage.value.set(value)
# # Voltage get/set
# def set_voltage_value(self, value):
# self.voltage.value.set(value)

def get_voltage_value(self):
self.voltage.value.get()
# def get_voltage_value(self):
# self.voltage.value.get()

# Current get/set
def set_current_value(self, value):
self.current.value.set(value)
# # Current get/set
# def set_current_value(self, value):
# self.current.value.set(value)

def get_current_value(self):
self.current.value.get()
# def get_current_value(self):
# self.current.value.get()

0 comments on commit fd5b778

Please sign in to comment.