Skip to content

Commit

Permalink
환경 모듈 조도 이름 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
boobooboo2 committed Dec 18, 2024
1 parent eeb35b9 commit 2d60404
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/basic_usage_examples/env_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@

while True:
print(f"humidity(%): {env.humidity:<10} temperature(°C): {env.temperature:<10} "
f"intensity(%): {env.intensity:<10} Volume(%): {env.volume:<10}", end="\r")
f"illuminance(%): {env.illuminance:<10} Volume(%): {env.volume:<10}", end="\r")
time.sleep(0.02)
6 changes: 3 additions & 3 deletions modi_plus/module/input_module/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class Env(InputModule):
PROPERTY_OFFSET_VOLUME = 6

@property
def intensity(self) -> int:
"""Returns the value of intensity between 0 and 100
def illuminance(self) -> int:
"""Returns the value of illuminance between 0 and 100
:return: The environment's intensity.
:return: The environment's illuminance.
:rtype: int
"""

Expand Down
4 changes: 2 additions & 2 deletions modi_plus/util/inspection_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ def inspect_battery(self, module, i, nb_modules):
def inspect_env(self, module, i, nb_modules):
self.print_wrap(
"""
Environment module has intensity, temperature, humidity and volume as its property.
Environment module has illuminance, temperature, humidity and volume as its property.
"""
)
input("\nIf you are ready to inspect this module, Press ENTER: ")
self.clear()

properties = ["intensity", "temperature", "humidity", "volume"]
properties = ["illuminance", "temperature", "humidity", "volume"]

for prop in properties:
self.print_module_page(module, i, nb_modules)
Expand Down
2 changes: 1 addition & 1 deletion modi_plus/util/usage_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def run_env_manual(self):
env = bundle.envs[0]
while True:
print(f"Env ({env.id}) intensity: {env.intensity}")
print(f"Env ({env.id}) illuminance: {env.illuminance}")
print(f"Env ({env.id}) temperature: {env.temperature}")
print(f"Env ({env.id}) humidity: {env.humidity}")
print(f"Env ({env.id}) volume: {env.volume}")
Expand Down
6 changes: 3 additions & 3 deletions tests/module/input_module/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ def test_get_humidity(self):
)
self.assertEqual(_, 0)

def test_get_intensity(self):
"""Test get_intensity method."""
def test_get_illuminance(self):
"""Test get_illuminance method."""

_ = self.env.intensity
_ = self.env.illuminance
self.assertEqual(
self.connection.send_list[0],
parse_get_property_message(-1, Env.PROPERTY_ENV_STATE, self.env.prop_samp_freq)
Expand Down

0 comments on commit 2d60404

Please sign in to comment.