Skip to content

Commit

Permalink
Release v1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Antoine committed Oct 5, 2020
1 parent e3625de commit 8c38b89
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 16 deletions.
2 changes: 1 addition & 1 deletion embedded/application/inc/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#ifndef DEMO_VERSION
#warning "No demo version provided"
#define DEMO_VERSION "v1.3.0"
#define DEMO_VERSION "v1.3.1"
#endif

typedef struct
Expand Down
1 change: 1 addition & 0 deletions embedded/demo/inc/demo_configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#define DEMO_COMMON_RF_SWITCH_STANDBY 0x00
#define DEMO_COMMON_RF_SWITCH_RX ( LR1110_SYSTEM_RFSW0_HIGH )
#define DEMO_COMMON_RF_SWITCH_TX ( LR1110_SYSTEM_RFSW0_HIGH | LR1110_SYSTEM_RFSW1_HIGH )
#define DEMO_COMMON_RF_SWITCH_TX_HP ( LR1110_SYSTEM_RFSW1_HIGH )
#define DEMO_COMMON_RF_SWITCH_WIFI ( LR1110_SYSTEM_RFSW3_HIGH )
#define DEMO_COMMON_RF_SWITCH_GNSS ( LR1110_SYSTEM_RFSW2_HIGH )

Expand Down
1 change: 1 addition & 0 deletions embedded/demo/src/device_transceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void DeviceTransceiver::ResetAndInit( )
rf_switch_setup.enable = DEMO_COMMON_RF_SWITCH_ENABLE;
rf_switch_setup.standby = DEMO_COMMON_RF_SWITCH_STANDBY;
rf_switch_setup.tx = DEMO_COMMON_RF_SWITCH_TX;
rf_switch_setup.tx_hp = DEMO_COMMON_RF_SWITCH_TX_HP;
rf_switch_setup.rx = DEMO_COMMON_RF_SWITCH_RX;
rf_switch_setup.wifi = DEMO_COMMON_RF_SWITCH_WIFI;
rf_switch_setup.gnss = DEMO_COMMON_RF_SWITCH_GNSS;
Expand Down
2 changes: 2 additions & 0 deletions embedded/hci/Command/Inc/command_fetch_result.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ class CommandFetchResult : public CommandInterface
*/
static uint8_t AppendValueAtIndex( uint8_t* array, const uint16_t index, const uint32_t value );

static uint8_t ConvertWifiTypeToSerial( const demo_wifi_signal_type_t& wifi_result_type );

private:
Hci& hci;
EnvironmentInterface& environment;
Expand Down
23 changes: 22 additions & 1 deletion embedded/hci/Command/Src/command_fetch_result.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void CommandFetchResult::FetchWifiResults( const demo_wifi_scan_all_results_t& w
local_result.mac_address[4],
local_result.mac_address[5],
local_result.channel,
local_result.type,
CommandFetchResult::ConvertWifiTypeToSerial( local_result.type ),
( uint8_t ) local_result.rssi,
( uint8_t )( ( local_detection_us & 0x000000FF ) >> 0 ),
( uint8_t )( ( local_detection_us & 0x0000FF00 ) >> 8 ),
Expand Down Expand Up @@ -193,3 +193,24 @@ uint8_t CommandFetchResult::AppendValueAtIndex( uint8_t* array, const uint16_t i

return 4;
}

uint8_t CommandFetchResult::ConvertWifiTypeToSerial( const demo_wifi_signal_type_t& wifi_result_type )
{
uint8_t value = 0;
switch( wifi_result_type )
{
case DEMO_WIFI_TYPE_B:
{
value = 1;
break;
}

case DEMO_WIFI_TYPE_G:
case DEMO_WIFI_TYPE_N:
{
value = 2;
break;
}
}
return value;
}
11 changes: 11 additions & 0 deletions host/lr1110evk/FieldTestPost/Core/FileReader.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@


class FileReader:
DEFAULT_CHIP_UID_VERSION = "ff-ff-ff-ff-ff-ff-ff-ff"
DATE_FORMAT = "%Y-%m-%d %H:%M:%S.%f"
VERSION_TOKEN = "# version:"
REGEXP_LOG = re.compile(
Expand Down Expand Up @@ -77,6 +78,16 @@ def parse_file(filename):
result_line = None
if result_line:
scanned_results.append(result_line)
if not version:
version = Version(
host_version="unknown",
demo_version="unknown",
driver_version="unknown",
lr1110_version="unknown",
almanac_crc="unknown",
almanac_ages="unknown",
chip_uid=FileReader.DEFAULT_CHIP_UID_VERSION,
)
return scanned_results, version

@staticmethod
Expand Down
14 changes: 2 additions & 12 deletions host/lr1110evk/FieldTestPost/Core/RequestSender.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

from lr1110evk.BaseTypes import ScannedMacAddress, ScannedGnss, Version
from lr1110evk.BaseTypes import ScannedMacAddress, ScannedGnss
from .FileReader import FileReader
from .RequestBase import RequestWifiGls, RequestGnssPerDevice, GnssRequestFakeUplink
from .ResponseBase import ResponseBase
Expand Down Expand Up @@ -145,18 +145,8 @@ def send_request(self, request):
)
return coordinate

def build_request_group_iterator_from_result_lines(self, result_lines, versions):
def build_request_group_iterator_from_result_lines(self, result_lines):
key_scan_result_groups = FileReader.generate_result_groups(result_lines)
if not versions:
versions = Version(
host_version="unknown",
demo_version="unknown",
driver_version="unknown",
lr1110_version="unknown",
almanac_crc="unknown",
almanac_ages="unknown",
chip_uid="Unknown",
)
for key_scan_group in key_scan_result_groups:
# key = key_scan_group[0]
group_result_lines = list(key_scan_group[1])
Expand Down
18 changes: 16 additions & 2 deletions host/lr1110evk/FieldTestPost/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,15 @@ def post_analyzis_fetch_results():
action="store",
default=None,
)
parser.add_argument(
"-i",
"--chip-id",
help="Force the Chip ID value when calling solver. (The chip ID is read from the version line in resultFile. If there is no version line and this flag is not used, then the default value is set to {})".format(
FileReader.DEFAULT_CHIP_UID_VERSION
),
action="store",
default=None,
)
parser.add_argument(
"--verbose", "-v", help="Verbose", action="store_true", default=False
)
Expand All @@ -191,11 +200,16 @@ def post_analyzis_fetch_results():

request_sender = RequestSender(configuration)
scan_results, version = FileReader.parse_file(args.resultFile)
request_sender.device_eui = version.chip_uid

if args.chip_id:
request_sender.device_eui = args.chip_id
else:
request_sender.device_eui = version.chip_uid

output_file = args.outputFile

scan_request_iterator = request_sender.build_request_group_iterator_from_result_lines(
scan_results, version
scan_results
)

urls_push = {
Expand Down

0 comments on commit 8c38b89

Please sign in to comment.