Update docs and fix bugs (#149)
Improved the docs for the 3 main Tactility projects. I also fixed some inaccuracies and bugs in certain APIs as I went through the code.
This commit is contained in:
committed by
GitHub
parent
ff4287e2ce
commit
415096c3b2
@@ -84,53 +84,42 @@ WifiRadioState getRadioState();
|
||||
*/
|
||||
void scan();
|
||||
|
||||
/**
|
||||
* @return true if wifi is actively scanning
|
||||
*/
|
||||
/** @return true if wifi is actively scanning */
|
||||
bool isScanning();
|
||||
|
||||
/**
|
||||
* @return true the ssid name or empty string
|
||||
*/
|
||||
/** @return true the ssid name or empty string */
|
||||
std::string getConnectionTarget();
|
||||
|
||||
/**
|
||||
* @brief Returns the access points from the last scan (if any). It only contains public APs.
|
||||
*/
|
||||
/** @return the access points from the last scan (if any). It only contains public APs. */
|
||||
std::vector<WifiApRecord> getScanResults();
|
||||
|
||||
/**
|
||||
* @brief Overrides the default scan result size of 16.
|
||||
* @param records the record limit for the scan result (84 bytes per record!)
|
||||
* @param[in] records the record limit for the scan result (84 bytes per record!)
|
||||
*/
|
||||
void setScanRecords(uint16_t records);
|
||||
|
||||
/**
|
||||
* @brief Enable/disable the radio. Ignores input if desired state matches current state.
|
||||
* @param enabled
|
||||
* @param[in] enabled
|
||||
*/
|
||||
void setEnabled(bool enabled);
|
||||
|
||||
/**
|
||||
* @brief Connect to a network. Disconnects any existing connection.
|
||||
* Returns immediately but runs in the background. Results are through pubsub.
|
||||
* @param ap
|
||||
* @param[in] ap
|
||||
* @param[in] remember whether to save the ap data to the settings upon successful connection
|
||||
*/
|
||||
void connect(const settings::WifiApSettings* ap, bool remember);
|
||||
|
||||
/**
|
||||
* @brief Disconnect from the access point. Doesn't have any effect when not connected.
|
||||
*/
|
||||
/** @brief Disconnect from the access point. Doesn't have any effect when not connected. */
|
||||
void disconnect();
|
||||
|
||||
/**
|
||||
* Return true if the connection isn't unencrypted.
|
||||
*/
|
||||
/** @return true if the connection isn't unencrypted. */
|
||||
bool isConnectionSecure();
|
||||
|
||||
/**
|
||||
* Returns the RSSI value (negative number) or return 1 when not connected
|
||||
*/
|
||||
/** @return the RSSI value (negative number) or return 1 when not connected. */
|
||||
int getRssi();
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -780,7 +780,7 @@ static void dispatchConnect(std::shared_ptr<void> context) {
|
||||
TT_LOG_I(TAG, "Waiting for EventFlag by event_handler()");
|
||||
|
||||
if (bits & WIFI_CONNECTED_BIT) {
|
||||
wifi->setSecureConnection(wifi_config.sta.password[0] != 0x00);
|
||||
wifi->setSecureConnection(wifi_config.sta.password[0] != 0x00U);
|
||||
wifi->setRadioState(WIFI_RADIO_CONNECTION_ACTIVE);
|
||||
publish_event_simple(wifi, WifiEventTypeConnectionSuccess);
|
||||
TT_LOG_I(TAG, "Connected to %s", wifi->connection_target.ssid);
|
||||
|
||||
Reference in New Issue
Block a user