Skip to content

Conversation

aliphys
Copy link
Contributor

@aliphys aliphys commented Apr 18, 2023

Description

  • Add in-code documentation for BHY2Host classes
    • Arduino_BHY2Host
    • BLEHandler
    • EslovHandler

Pull request type

[ ] Fix
[x ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change

@aliphys aliphys requested a review from alrvid April 18, 2023 06:23
@github-actions
Copy link

Memory usage change @ 9c3ff2a

Board flash % RAM for global variables %
arduino:mbed_nicla:nicla_sense 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A
arduino:samd:mkrgsm1400 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrnb1500 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwan1310 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrwifi1010 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
arduino:samd:mkrzero 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table
Board Arduino_BHY2/examples/App
flash
% Arduino_BHY2/examples/App
RAM for global variables
% Arduino_BHY2/examples/AppLowDelay
flash
% Arduino_BHY2/examples/AppLowDelay
RAM for global variables
% Arduino_BHY2/examples/BHYFirmwareUpdate
flash
% Arduino_BHY2/examples/BHYFirmwareUpdate
RAM for global variables
% Arduino_BHY2/examples/DataHarvester
flash
% Arduino_BHY2/examples/DataHarvester
RAM for global variables
% Arduino_BHY2/examples/Fail_Safe_flasher
flash
% Arduino_BHY2/examples/Fail_Safe_flasher
RAM for global variables
% Arduino_BHY2/examples/ReadSensorConfiguration
flash
% Arduino_BHY2/examples/ReadSensorConfiguration
RAM for global variables
% Arduino_BHY2/examples/ShowSensorList
flash
% Arduino_BHY2/examples/ShowSensorList
RAM for global variables
% Arduino_BHY2/examples/Standalone
flash
% Arduino_BHY2/examples/Standalone
RAM for global variables
% Arduino_BHY2/examples/StandaloneFlashStorage
flash
% Arduino_BHY2/examples/StandaloneFlashStorage
RAM for global variables
% Arduino_BHY2Host/examples/Accelerometer
flash
% Arduino_BHY2Host/examples/Accelerometer
RAM for global variables
% Arduino_BHY2Host/examples/Orientation
flash
% Arduino_BHY2Host/examples/Orientation
RAM for global variables
% Arduino_BHY2Host/examples/Temperature
flash
% Arduino_BHY2Host/examples/Temperature
RAM for global variables
% Arduino_BHY2Host/examples/Nicla_IoT_Bridge
flash
% Arduino_BHY2Host/examples/Nicla_IoT_Bridge
RAM for global variables
% Arduino_BHY2Host/examples/Portenta_BLE_Bridge
flash
% Arduino_BHY2Host/examples/Portenta_BLE_Bridge
RAM for global variables
%
arduino:mbed_nicla:nicla_sense 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:mbed_portenta:envie_m7 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A
arduino:samd:mkrgsm1400 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkrnb1500 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkrwan1310 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkrwifi1010 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
arduino:samd:mkrzero 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0 0 0.0
Click for full report CSV
Board,Arduino_BHY2/examples/App<br>flash,%,Arduino_BHY2/examples/App<br>RAM for global variables,%,Arduino_BHY2/examples/AppLowDelay<br>flash,%,Arduino_BHY2/examples/AppLowDelay<br>RAM for global variables,%,Arduino_BHY2/examples/BHYFirmwareUpdate<br>flash,%,Arduino_BHY2/examples/BHYFirmwareUpdate<br>RAM for global variables,%,Arduino_BHY2/examples/DataHarvester<br>flash,%,Arduino_BHY2/examples/DataHarvester<br>RAM for global variables,%,Arduino_BHY2/examples/Fail_Safe_flasher<br>flash,%,Arduino_BHY2/examples/Fail_Safe_flasher<br>RAM for global variables,%,Arduino_BHY2/examples/ReadSensorConfiguration<br>flash,%,Arduino_BHY2/examples/ReadSensorConfiguration<br>RAM for global variables,%,Arduino_BHY2/examples/ShowSensorList<br>flash,%,Arduino_BHY2/examples/ShowSensorList<br>RAM for global variables,%,Arduino_BHY2/examples/Standalone<br>flash,%,Arduino_BHY2/examples/Standalone<br>RAM for global variables,%,Arduino_BHY2/examples/StandaloneFlashStorage<br>flash,%,Arduino_BHY2/examples/StandaloneFlashStorage<br>RAM for global variables,%,Arduino_BHY2Host/examples/Accelerometer<br>flash,%,Arduino_BHY2Host/examples/Accelerometer<br>RAM for global variables,%,Arduino_BHY2Host/examples/Orientation<br>flash,%,Arduino_BHY2Host/examples/Orientation<br>RAM for global variables,%,Arduino_BHY2Host/examples/Temperature<br>flash,%,Arduino_BHY2Host/examples/Temperature<br>RAM for global variables,%,Arduino_BHY2Host/examples/Nicla_IoT_Bridge<br>flash,%,Arduino_BHY2Host/examples/Nicla_IoT_Bridge<br>RAM for global variables,%,Arduino_BHY2Host/examples/Portenta_BLE_Bridge<br>flash,%,Arduino_BHY2Host/examples/Portenta_BLE_Bridge<br>RAM for global variables,%
arduino:mbed_nicla:nicla_sense,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0
arduino:mbed_portenta:envie_m7,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A,N/A
arduino:samd:mkrgsm1400,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,,,,,,,,
arduino:samd:mkrnb1500,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,,,,,,,,
arduino:samd:mkrwan1310,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,,,,,,,,
arduino:samd:mkrwifi1010,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,,,,
arduino:samd:mkrzero,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,,,,,,,,


// Necessary API. Update function should be continuously polled if PASSTHORUGH is ENABLED
/**
* @brief
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Brief description missing

* @brief
*
* @param passthrough Enable Serial port at 115200 bps
* @param niclaConnection Configuration for set @ref NiclaWiring state
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @param niclaConnection Configuration for set @ref NiclaWiring state
* @param niclaConnection Configuration for setting @ref NiclaWiring state. This is useful to configure the board to communicate either via ESLOV, BLE or both. It's also possible to mount the Nicla Sense ME as a shield. In that case you need to pass `NICLA_AS_SHIELD` to this parameter.

Comment on lines +50 to +51
* @return true Connection successful to the Nicla board
* @return false Connection unsuccessful to the Nicla board
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to our style guide we should use a single @return statement.

*/
bool begin(bool passthrough = false, NiclaWiring niclaConnection = NICLA_VIA_ESLOV);
/**
* @brief Pings sensor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief Pings sensor
* @brief Requests new sensor data from the client (Nicla Sense ME) and saves it locally so it can be retrieved via `Sensor` objects.

*/
void update();
/**
* @brief Pings sensor and then sleep
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief Pings sensor and then sleep
* @brief Requests new sensor data from the client (Nicla Sense ME) and saves it locally so it can be retrieved via `Sensor` objects. The Nicla Sense ME's sensors are then put to sleep for the given amount of milliseconds.

*/
uint8_t requestAvailableData();
/**
* @brief Obtain long data sent over ESLOV to the host board
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as for requestAvailableData()

*/
uint8_t requestAvailableLongData();
/**
* @brief Request data from the Nicla board
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for a specific sensor, right? So do I need to pass the sensor ID or how does this work?

*
* @param sData
* @return true Request successful
* @return false Request unsuccessful
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Transmission error only or also configuration error?

*/
bool requestSensorData(SensorDataPacket &sData);
/**
* @brief Request long data from the Nicla board
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as for requestSensorData()


protected:
/**
* @brief Nicla Sense ME is mounted as a Shield
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the function do? Does it set some pins, change some configuration, ...?

@aliphys aliphys removed the request for review from alrvid June 7, 2023 14:17
@aliphys
Copy link
Contributor Author

aliphys commented Jun 19, 2023

Closing PR, changes are in #104

@aliphys aliphys closed this Jun 19, 2023
@per1234 per1234 added topic: documentation Related to documentation for the project conclusion: duplicate Has already been submitted type: enhancement Proposed improvement labels Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: duplicate Has already been submitted topic: documentation Related to documentation for the project type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants