Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

Alex PabouctsidisA

Alex Pabouctsidis

@Alex Pabouctsidis
Unfollow Follow
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Baremetal peripheral interaction via the SDSP
    Alex PabouctsidisA Alex Pabouctsidis

    @Eric-Katzfey We've started working again on this project. I've now managed to create a bare bones setup for the apps + sdsp, which piggy packs on the fc_sensor lib.

    something like this:

    #include <stdio.h>
    #include <fc_sensor.h>
    
    void receive_cb(const char *topic,
                     const uint8_t *data,
                     uint32_t length_in_bytes)
    {
    }
    void advertise_cb(const char *topic)
    {
    }
    void add_subscription_cb(const char *topic)
    {
    }
    void remove_subscription_cb(const char *topic)
    {
    }
    
    int main(int argc, char **argv)
    {
        fc_callbacks func_ptr = {
            .rx_callback = &receive_cb,
            .ad_callback = &advertise_cb,
            .sub_callback = &add_subscription_cb,
            .remove_sub_callback = &remove_subscription_cb
        };
        fc_sensor_initialize(false, &func_ptr);
        
        printf("Hello, world!\n");
        return 0;
    }
    

    and

    #include <main.h>
    
    #define FARF_LOW 1
    #include <qurt.h>
    #include <HAP_farf.h>
    
    static fc_func_ptrs g_func_ptrs;
    // entry point - called by fc_sensor system
    int px4muorb_orb_initialize(fc_func_ptrs *func_ptrs, int32_t clock_offset_us)
    {
        FARF(LOW, "SLPI Flya Main\n");
        g_func_ptrs = *func_ptrs;
    
        return 0;
    }
    
    int px4muorb_topic_advertised(const char *name)
    {
        return 0;
    }
    int px4muorb_add_subscriber(const char *name)
    {
        return 0;
    }
    int px4muorb_remove_subscriber(const char *name)
    {
        return 0;
    }
    int px4muorb_send_topic_data(const char *name, const uint8_t *data, int data_len_in_bytes)
    {
        return 0;
    }
    

    And from there I could use the spi functions to read the IMU, so all good.

    I was hoping to get some clarification on where does the the proprietary code that interacts with the HW sit? (i.e. sns_flight_controller_sensor). Is it part of libfc_sensor.so? or is it baked in the SLPI firmware found in /home/firmware/slpi.bxx?

    Software Development
  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups