3 Replies Latest reply on Mar 6, 2015 4:48 PM by charles.swiger

    Change data from uint8 to float32

    charles.swiger

       Hi - I've successfully modified the capsense proximity project to add more data characteristics and changed their names and change the numbers various ways w/ no problem.

         

       

         

      Now I'm trying to change the data to float32, and did so also in the BLE GATT server to be float32 for the characteristic - but am getting an incompatible pointer type:

         

      void SendData(float32 Ah, float32 V, float32 A, float32 S, float32 D)

         

      {

         

      CYBLE_GATTS_HANDLE_VALUE_NTF_T notificationHandle; 

         

      if(busyStatus == CYBLE_STACK_STATE_FREE)

         

      {

         

      notificationHandle.attrHandle = CYBLE_EBIKEDATA_AMPHOUR_CHAR_HANDLE;

         

      notificationHandle.value.val = &Ah;               <-- incompatible pointer types assigned to uint8 from float32

         

      notificationHandle.value.len = NOTIFICATION_DATA_LEN;

         

      CyBle_GattsNotification(connectionHandle,&notificationHandle);

         

       

         

      #define NOTIFICATION_DATA_LEN          4

         

      Looking for how to update different data types, or where the uint8 is baked in, or an example to copy. Thanks!

         

      Minimal bundle attached.