/
LSM9DS1.robot
40 lines (29 loc) · 1.26 KB
/
LSM9DS1.robot
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
*** Settings ***
Suite Setup Setup
Suite Teardown Teardown
Test Setup Reset Emulation
Test Teardown Test Teardown
Resource ${RENODEKEYWORDS}
*** Variables ***
${UART} sysbus.uart0
${URI} @https://dl.antmicro.com/projects/renode
*** Keywords ***
Create Machine
Execute Command mach create
Execute Command machine LoadPlatformDescription @platforms/boards/arduino_nano_33_ble.repl
Execute Command sysbus LoadELF ${URI}/arduino_nano_33_ble--tf_magic_wand.elf-s_7482772-5722cd8b1dd7b040366cbc259f5175b62aa4496c
*** Test Cases ***
Should Detect RING Motion
Create Machine
Create Terminal Tester ${UART}
Execute Command sysbus.twi0.lsm9ds1_imu FeedAccelerationSample @${CURDIR}/circle_rotated.data
Start Emulation
Wait For Line On Uart Magic starts
Wait For Line On Uart RING:
Should Detect SLOPE Motion
Create Machine
Create Terminal Tester ${UART}
Execute Command sysbus.twi0.lsm9ds1_imu FeedAccelerationSample @${CURDIR}/angle_rotated.data
Start Emulation
Wait For Line On Uart Magic starts
Wait For Line On Uart SLOPE: