diff --git a/CaSSAndRA/app.py b/CaSSAndRA/app.py index c29e333..0258e29 100755 --- a/CaSSAndRA/app.py +++ b/CaSSAndRA/app.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -#Version:0.106.1 AT+P command is send agter every reconnect state, bug fix in MQTT settings +#Version:0.107.0 dashed current mow line # package imports import os import sys diff --git a/CaSSAndRA/src/backend/data/appdata.py b/CaSSAndRA/src/backend/data/appdata.py index 4b526b9..347318f 100644 --- a/CaSSAndRA/src/backend/data/appdata.py +++ b/CaSSAndRA/src/backend/data/appdata.py @@ -1,4 +1,4 @@ import logging logger = logging.getLogger(__name__) -version = '0.106.1' \ No newline at end of file +version = '0.107.0' \ No newline at end of file diff --git a/CaSSAndRA/src/components/mapping/modal.py b/CaSSAndRA/src/components/mapping/modal.py index 1bbaa56..9eef370 100644 --- a/CaSSAndRA/src/components/mapping/modal.py +++ b/CaSSAndRA/src/components/mapping/modal.py @@ -131,8 +131,8 @@ State(ids.DROPDOWNSUNRAYIMPORT, 'value'), State(ids.MODALOVERWRITEPERIMETER, 'is_open'), State(ids.INPUTPERIMETERNAME, 'value')]) -def overwrite_perimeter(bsp_n_clicks: int, bok_n_clicks, map_nr: str(), - is_open: bool, perimeter_name: str()) -> bool: +def overwrite_perimeter(bsp_n_clicks: int, bok_n_clicks, map_nr: str, + is_open: bool, perimeter_name: str) -> bool: context = ctx.triggered_id if context == ids.OKBUTTONOVERWRITEPERIMTER: mapping_maps.select_imported(map_nr) @@ -149,7 +149,7 @@ def overwrite_perimeter(bsp_n_clicks: int, bok_n_clicks, map_nr: str(), State(ids.DROPDOWNCHOOSEPERIMETER, 'value'), State(ids.MODALSELECTEDPERIMETER, 'is_open'),]) def selected_perimeter(bsp_n_clicks: int, bok_n_clicks: int, - selected_perimeter: str(), is_open: bool) -> list: + selected_perimeter: str, is_open: bool) -> list: context = ctx.triggered_id if selected_perimeter == None: return is_open @@ -183,7 +183,7 @@ def new_perimeter(baddp_n_clicks: int, bok_n_clicks, is_open: bool) -> bool: State(ids.DROPDOWNCHOOSEPERIMETER, 'value'), State(ids.MODALCOPYPERIMETER, 'is_open')]) def copy_perimeter(bcp_n_clicks: int, bok_n_clicks: int, - cpy_perimeter_name: str(), selected_perimeter: str(), + cpy_perimeter_name: str, selected_perimeter: str, is_open: bool) -> bool: context = ctx.triggered_id if context == ids.OKBUTTONCOPYPERIMETER: @@ -199,7 +199,7 @@ def copy_perimeter(bcp_n_clicks: int, bok_n_clicks: int, State(ids.DROPDOWNCHOOSEPERIMETER, 'value'), State(ids.MODALREMOVEPERIMETER, 'is_open')]) def remove_perimeter(brp_n_clicks: int, bok_n_clicks, - selected_perimeter: str(), is_open: bool) -> bool: + selected_perimeter: str, is_open: bool) -> bool: context = ctx.triggered_id if context == ids.OKBUTTONREMOVEPERIMETER: saveddata.remove_perimeter(mapping_maps.saved, selected_perimeter, tasks.saved, tasks.saved_parameters) @@ -219,7 +219,7 @@ def remove_perimeter(brp_n_clicks: int, bok_n_clicks, State(ids.INPUTNEWPERIMETERNAME, 'value'), State(ids.MODALFINISHMAPPING, 'is_open')]) def finish_mapping(bff_n_clicks: int, bok_n_clicks: int, - perimeter_name: str(), is_open: bool) -> bool: + perimeter_name: str, is_open: bool) -> bool: context = ctx.triggered_id if context == ids.OKBUTTONFINISHMAPPING: mapping_maps.check_dockpoints() @@ -272,7 +272,7 @@ def nofix_solution(banp_n_clicks: int, State(ids.DROPDOWNCHOOSEPERIMETER, 'value'), State(ids.MODALRENAMEPERIMETER, 'is_open')]) def copy_perimeter(brp_n_clicks: int, bok_n_clicks: int, - new_perimeter_name: str(), selected_perimeter: str(), + new_perimeter_name: str, selected_perimeter: str, is_open: bool) -> bool: context = ctx.triggered_id if context == ids.OKBUTTONRENAMEPERIMETER: diff --git a/CaSSAndRA/src/components/state/map.py b/CaSSAndRA/src/components/state/map.py index 3d23c4b..34b49f6 100644 --- a/CaSSAndRA/src/components/state/map.py +++ b/CaSSAndRA/src/components/state/map.py @@ -215,9 +215,11 @@ def update(n_intervals: int, current_mow_idx = 0 path_finished = filtered[filtered.index < robot.position_mow_point_index] path_to_go = filtered[filtered.index >= current_mow_idx] + current_target = filtered[(filtered.index == current_mow_idx)|(filtered.index == current_mow_idx + 1)] #add mow progress traces.append(go.Scatter(x=path_finished['X'], y=path_finished['Y'], mode='lines', name='mow finished', opacity=0.5, line=dict(color='rgba(127, 127, 127, 0.25)'))) traces.append(go.Scatter(x=path_to_go['X'], y=path_to_go['Y'], mode='lines', name='mow to go', opacity=0.7, line=dict(color='#7fb249'))) + traces.append(go.Scatter(x=current_target['X'], y=current_target['Y'], mode='lines', name='current target', opacity=0.8, line=dict(color='black', dash='dash', width=2))) mowdata = [dict(text='Distance: '+str(current_map.finished_distance)+'m/'+str(current_map.distance)+'m ('+str(current_map.distance_perc)+'%)', showarrow=False, xref="paper", yref="paper",x=1,y=1), dict(text='Index: '+str(current_map.finished_idx)+'/'+str(current_map.idx)+' ('+str(current_map.idx_perc)+'%)', showarrow=False, xref="paper", yref="paper",x=1,y=0.95), dict(text='Area to mow: '+str(current_map.areatomow)+'sqm', showarrow=False, xref="paper", yref="paper",x=1,y=0.9)]