Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: common/utils.c
- Revision:
- 6:9d393a9677f4
- Parent:
- 5:0728bde67bdb
- Child:
- 10:14954555be2a
diff -r 0728bde67bdb -r 9d393a9677f4 common/utils.c
--- a/common/utils.c Wed Jun 05 05:39:15 2019 +0000
+++ b/common/utils.c Sat Jun 15 14:30:49 2019 +0000
@@ -26,8 +26,7 @@
ADMW_LOG_INFO("\tActive Configuration Errors - ATTENTION REQUIRED");
if (pStatus->deviceStatus & ADMW_DEVICE_STATUS_LUT_ERROR)
ADMW_LOG_INFO("\tActive Look-Up Table Errors - ATTENTION REQUIRED");
- if (pStatus->deviceStatus & ADMW_DEVICE_STATUS_EXT_FLASH_ERROR)
- ADMW_LOG_INFO("\tActive External Flash Errors - ATTENTION REQUIRED");
+
if (pStatus->deviceStatus & ADMW_DEVICE_STATUS_ERROR)
{
@@ -45,12 +44,9 @@
if (pStatus->diagnosticsStatus & ADMW_DIAGNOSTICS_STATUS_CHECKSUM_ERROR)
ADMW_LOG_INFO("\t\t\tInternal Checksum fault detected");
- if (pStatus->diagnosticsStatus & ADMW_DIAGNOSTICS_STATUS_COMMS_ERROR)
- ADMW_LOG_INFO("\t\t\tInternal Communications fault detected");
- if (pStatus->diagnosticsStatus & ADMW_DIAGNOSTICS_STATUS_SUPPLY_MONITOR_ERROR)
- ADMW_LOG_INFO("\t\t\tSupply Monitor fault detected");
- if (pStatus->diagnosticsStatus & ADMW_DIAGNOSTICS_STATUS_SUPPLY_CAP_ERROR)
- ADMW_LOG_INFO("\t\t\tSupply Regulator Capacitor fault detected");
+
+
+
if (pStatus->diagnosticsStatus & ADMW_DIAGNOSTICS_STATUS_CONVERSION_ERROR)
ADMW_LOG_INFO("\t\t\tInternal ADC Conversions fault detected");
if (pStatus->diagnosticsStatus & ADMW_DIAGNOSTICS_STATUS_CALIBRATION_ERROR)
@@ -117,31 +113,11 @@
uint32_t nNumSamples,
ADMW_MEASUREMENT_MODE eMeasurementMode)
{
- bool fftMode = (eMeasurementMode == ADMW_MEASUREMENT_MODE_FFT);
+
- for (uint32_t i = 0; i < nNumSamples; i++)
- {
- if (fftMode)
- {
- ADMW_LOG_INFO("Sample # %2d Channel # %2d :: Bin/Raw %8d :: Magnitude %e :: flags:%s%s",
- i+1,
- pSampleBuffer[i].channelId,
- pSampleBuffer[i].rawValue,
- pSampleBuffer[i].processedValue,
- pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ERROR ? " ERROR" : "",
- pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ALERT ? " ALERT" : "");
- }
- else
- {
- ADMW_LOG_INFO("Sample # %2d Channel # %2d :: Raw %0X %f :: Processed %f :: flags:%s%s",
- i+1,
- pSampleBuffer[i].channelId,
- pSampleBuffer[i].rawValue, (pSampleBuffer[i].rawValue/1024.0),
- pSampleBuffer[i].processedValue,
- pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ERROR ? " ERROR" : "",
- pSampleBuffer[i].status & ADMW_DEVICE_STATUS_ALERT ? " ALERT" : "");
- }
- }
+
+
+
}
static void gpioCallbackFn(ADMW_GPIO_PIN ePinId, void * pArg)