@@ -58,11 +58,12 @@ Entry.WhalesbotEagle1001.setLanguage = function () {
5858 whalesbot_eagle_1001_openning_3d_simulator : '3D 시뮬레이터를 엽니 다' ,
5959 whalesbot_eagle_1001_clean : '삭제' ,
6060 whalesbot_eagle_1001_restart : '재시작' ,
61+ whalesbot_eagle_1001_get_status : '상태 가져오기' ,
6162 whalesbot_eagle_1001_entering_pitch_mode : '준비모드 시작하기' ,
6263 whalesbot_eagle_1001_exit_pitch_mode : '준비모드 끝내기' ,
6364 whalesbot_eagle_1001_automatic_take_off_height : '자동 이륙 높이 %1 cm' ,
6465 whalesbot_eagle_1001_automatic_take_off_altitude_speed_offset : '자동 이륙 고도 %1 cm 속도 %2 X 오프셋 %3 도 Y 오프셋 %4 도 으로 이동하기' ,
65- whalesbot_eagle_1001_automatic_landing : '드로착륙 ' ,
66+ whalesbot_eagle_1001_automatic_landing : '드론착륙 ' ,
6667 whalesbot_eagle_1001_automatic_descent_speed_offset : '자동 낙하 속도 %1 X 오프셋 %2 도 Y 오프셋 %3 도' ,
6768 whalesbot_eagle_1001_set_the_flight_speed : '설정된 비행 속도는 %1 cm/s' ,
6869 whalesbot_eagle_1001_get_setting_speed : '설정 속도 가져오기' ,
@@ -76,7 +77,7 @@ Entry.WhalesbotEagle1001.setLanguage = function () {
7677 whalesbot_eagle_1001_turn_right : '오른쪽으로 회전 %1 °' ,
7778 whalesbot_eagle_1001_fly_in_the_specified_direction : '속도 %1 , 방향 %2 으로이동하기' ,
7879 whalesbot_eagle_1001_flight_designated : '지정된 거리를 비행합니다 x %1 cm y %2 cm z%3 cm 속도 %4 cm/s' ,
79- whalesbot_eagle_1001_set_the_four_channel_lever_quantity_of_remote_control : '리모컨 4개 채널 로드 설정 Pitch %1 Roll %2 액셀러레이터 %3 Yaw %4' ,
80+ whalesbot_eagle_1001_set_the_four_channel_lever_quantity_of_remote_control : '리모컨 4개 채널 설정 Pitch %1 Roll %2 Throttle %3 Yaw %4' ,
8081 whalesbot_eagle_1001_stop_moving_and_hover : '호버링기능' ,
8182 whalesbot_eagle_1001_hover_at_specified_altitude : '지정된 높이에 서스펜션 %1 cm' ,
8283 whalesbot_eagle_1001_emergency_stop : '긴급정지' ,
@@ -151,6 +152,7 @@ Entry.WhalesbotEagle1001.setLanguage = function () {
151152 whalesbot_eagle_1001_openning_3d_simulator : 'Open 3D Simulator' ,
152153 whalesbot_eagle_1001_clean : 'Clean' ,
153154 whalesbot_eagle_1001_restart : 'Restart' ,
155+ whalesbot_eagle_1001_get_status : 'Get Status' ,
154156 whalesbot_eagle_1001_entering_pitch_mode : 'Entering Pitch Mode' ,
155157 whalesbot_eagle_1001_exit_pitch_mode : 'Exit Pitch Mode' ,
156158 whalesbot_eagle_1001_automatic_take_off_height : 'Automatic Take Off Height %1 cm' ,
@@ -270,6 +272,7 @@ Entry.WhalesbotEagle1001.blockMenuBlocks = [
270272 'whalesbot_eagle_1001_execute_script' ,
271273 'whalesbot_eagle_1001_clean' ,
272274 'whalesbot_eagle_1001_restart' ,
275+ 'whalesbot_eagle_1001_get_status' ,
273276 // light & speaker blocks
274277 'whalesbot_eagle_1001_ls_debug_value' ,
275278 'whalesbot_eagle_1001_ls_display_symbol' ,
@@ -813,6 +816,38 @@ Entry.WhalesbotEagle1001.getBlocks = function () {
813816 } ,
814817 syntax : { js : [ ] , py : [ 'Entry.whalesbot_eagle_1001_clean()' ] } ,
815818 } ,
819+ whalesbot_eagle_1001_get_status : {
820+ color : EntryStatic . colorSet . block . default . HARDWARE ,
821+ outerLine : EntryStatic . colorSet . block . darken . HARDWARE ,
822+ fontColor : '#fff' ,
823+ skeleton : 'basic' ,
824+ statements : [ ] ,
825+ params : [
826+ {
827+ type : 'Block' ,
828+ accept : 'string' ,
829+ defaultType : 'number' ,
830+ } ,
831+ {
832+ type : 'Indicator' ,
833+ img : 'block_icon/moving_icon.svg' ,
834+ size : 11 ,
835+ } ,
836+ ] ,
837+ events : { } ,
838+ def : {
839+ type : 'whalesbot_eagle_1001_get_status' ,
840+ } ,
841+ paramsKeyMap : {
842+ VALUE : 0 ,
843+ } ,
844+ class : 'whalesbot_eagle_1001' ,
845+ isNotFor : [ 'whalesbot_eagle_1001' ] ,
846+ func ( sprite , script ) {
847+ _this . sendCmd ( 'get_status' ) ;
848+ } ,
849+ syntax : { js : [ ] , py : [ 'Entry.whalesbot_eagle_1001_get_status()' ] } ,
850+ } ,
816851 whalesbot_eagle_1001_entering_pitch_mode : {
817852 color : EntryStatic . colorSet . block . default . HARDWARE ,
818853 outerLine : EntryStatic . colorSet . block . darken . HARDWARE ,
@@ -2308,6 +2343,8 @@ Entry.WhalesbotEagle1001.getBlocks = function () {
23082343 class : 'whalesbot_eagle_1001_ss' ,
23092344 isNotFor : [ 'whalesbot_eagle_1001' ] ,
23102345 func ( sprite , script ) {
2346+ var posZ = Entry . hw . portData . state_position_z || '0' ;
2347+ return posZ ;
23112348 } ,
23122349 syntax : { js : [ ] , py : [ 'Entry.whalesbot_eagle_1001_ss_fly_state_POS_Z()' ] } ,
23132350 } ,
@@ -2327,6 +2364,8 @@ Entry.WhalesbotEagle1001.getBlocks = function () {
23272364 class : 'whalesbot_eagle_1001_ss' ,
23282365 isNotFor : [ 'whalesbot_eagle_1001' ] ,
23292366 func ( sprite , script ) {
2367+ var Laser = Entry . hw . portData . LaserTof || '0' ;
2368+ return Laser ;
23302369 } ,
23312370 syntax : { js : [ ] , py : [ 'Entry.whalesbot_eagle_1001_ss_fly_state_LASER()' ] } ,
23322371 } ,
@@ -2346,6 +2385,8 @@ Entry.WhalesbotEagle1001.getBlocks = function () {
23462385 class : 'whalesbot_eagle_1001_ss' ,
23472386 isNotFor : [ 'whalesbot_eagle_1001' ] ,
23482387 func ( sprite , script ) {
2388+ var Battery = Entry . hw . portData . Battery || '0' ;
2389+ return Battery ;
23492390 } ,
23502391 syntax : { js : [ ] , py : [ 'Entry.whalesbot_eagle_1001_ss_battery_voltage()' ] } ,
23512392 } ,
@@ -2365,6 +2406,8 @@ Entry.WhalesbotEagle1001.getBlocks = function () {
23652406 class : 'whalesbot_eagle_1001_ss' ,
23662407 isNotFor : [ 'whalesbot_eagle_1001' ] ,
23672408 func ( sprite , script ) {
2409+ var state = Entry . hw . portData . SPL06_temp || '0' ;
2410+ return state ;
23682411 } ,
23692412 syntax : { js : [ ] , py : [ 'Entry.whalesbot_eagle_1001_ss_fly_state_STATE_TEMP()' ] } ,
23702413 } ,
@@ -2400,6 +2443,14 @@ Entry.WhalesbotEagle1001.getBlocks = function () {
24002443 class : 'whalesbot_eagle_1001_ss' ,
24012444 isNotFor : [ 'whalesbot_eagle_1001' ] ,
24022445 func ( sprite , script ) {
2446+ var state = script . values [ 0 ] ;
2447+ if ( state === 'STATE_PITCH' ) {
2448+ return Entry . hw . portData . Pitch || '0' ;
2449+ } else if ( state === 'STATE_ROLL' ) {
2450+ return Entry . hw . portData . Roll || '0' ;
2451+ } else if ( state === 'STATE_YAW' ) {
2452+ return Entry . hw . portData . Yaw || '0' ;
2453+ }
24032454 } ,
24042455 syntax : { js : [ ] , py : [ 'Entry.whalesbot_eagle_1001_ss_attitude_angle()' ] } ,
24052456 } ,
@@ -2433,6 +2484,14 @@ Entry.WhalesbotEagle1001.getBlocks = function () {
24332484 class : 'whalesbot_eagle_1001_ss' ,
24342485 isNotFor : [ 'whalesbot_eagle_1001' ] ,
24352486 func ( sprite , script ) {
2487+ var state = script . values [ 0 ] ;
2488+ if ( state === 'GYPO_X' ) {
2489+ return Entry . hw . portData . Gypo_x || '0' ;
2490+ } else if ( state === 'GYPO_Y' ) {
2491+ return Entry . hw . portData . Gypo_y || '0' ;
2492+ } else if ( state === 'GYPO_Z' ) {
2493+ return Entry . hw . portData . Gypo_z || '0' ;
2494+ }
24362495 } ,
24372496 syntax : { js : [ ] , py : [ 'Entry.whalesbot_eagle_1001_ss_flight_angular_velocity()' ] } ,
24382497 } ,
@@ -2466,6 +2525,14 @@ Entry.WhalesbotEagle1001.getBlocks = function () {
24662525 class : 'whalesbot_eagle_1001_ss' ,
24672526 isNotFor : [ 'whalesbot_eagle_1001' ] ,
24682527 func ( sprite , script ) {
2528+ var state = script . values [ 0 ] ;
2529+ if ( state === 'ACC_X' ) {
2530+ return Entry . hw . portData . ACC_x || '0' ;
2531+ } else if ( state === 'ACC_Y' ) {
2532+ return Entry . hw . portData . ACC_y || '0' ;
2533+ } else if ( state === 'ACC_Z' ) {
2534+ return Entry . hw . portData . ACC_z || '0' ;
2535+ }
24692536 } ,
24702537 syntax : { js : [ ] , py : [ 'Entry.whalesbot_eagle_1001_ss_flight_acceleration()' ] } ,
24712538 } ,
0 commit comments