Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KWH40
fml40-reference-implementation
Commits
cbd84b95
Commit
cbd84b95
authored
Dec 03, 2020
by
GromeTT
Browse files
ENHÖ: Added documentation for AcceptsMoveCommands
parent
0e9d79c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
ml/fml40/features/functionalities/accepts_move_commands.py
View file @
cbd84b95
from
ml.ml40.features.functionalities.functionality
import
Functionality
"""This module implements the class AcceptsMoveCommands."""
from
ml.ml40.features.functionalities.functionality
import
Functionality
class
AcceptsMoveCommands
(
Functionality
):
"""This functionality signalizes that the thing can be moved remotely
via S3I-B messages ."""
def
__init__
(
self
,
name
=
""
,
identifier
=
""
):
"""Initializes the object.
:param name: Object name
:param identifier: Identifier
"""
super
().
__init__
(
name
=
name
,
identifier
=
identifier
)
def
move
(
self
,
longitude
:
float
,
latitude
:
float
):
"""Moves the thing to the position specified longitude and latitude.
:param longitude: Longitude
:param latitude: Latitude
"""
print
(
"move to longitude: {}, latitude : {}"
.
format
(
longitude
,
latitude
))
return
{
"longitude"
:
longitude
,
"latitude"
:
latitude
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment