# voxl2 portal source code

Source: https://forum.modalai.com/topic/2880/voxl2-portal-source-code
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2023-11-19 17:03:31 UTC by relevinsky
Replies: 3 · Views: 1242

## relevinsky · 2023-11-19 17:03:31 UTC

Hi,
Could you help me to understand in your voxl-portal source code, how I should modify code for adding in for e.g. in Camera : TFlite tab near "FPS" and "Inference" strings will appear my string "Hello world"?
Please help me. I know, where is a source code of voxl-portal("https://gitlab.com/voxl-public/voxl-sdk/services/voxl-portal").
Thank you for your help.

## Reply by Alex Kushleyev (ModalAI staff) · 2023-11-21 15:17:45 UTC

Do you want to add a static string or something that is sent from VOXL? 

The html source for the camera page is here : https://gitlab.com/voxl-public/voxl-sdk/services/voxl-portal/-/blob/master/web_root/video.html, you could add static context in the <body> tag.

## Reply by relevinsky · 2023-12-19 13:34:11 UTC (in reply to Alex Kushleyev)

@Alex-Kushleyev Hi,
Yes,
I want send some new string from VOXL2, that should appear near "FPS:....".
Thanks

## Reply by Alex Kushleyev (ModalAI staff) · 2023-12-20 18:56:02 UTC (in reply to relevinsky)

@relevinsky , i don't have a good example to point you to.. you would need to modify the code on the web GUI side and the code that is running on voxl-portal Voxl.

VOXL sends all the information to the browser via web sockets. Here is where video stats (including fps) are sent : https://gitlab.com/voxl-public/voxl-sdk/services/voxl-portal/-/blob/master/src/video_group_manager.cpp?ref_type=heads#L313  and there is the browser code that parses the video stats https://gitlab.com/voxl-public/voxl-sdk/services/voxl-portal/-/blob/master/web_root/video.html#L588. 

I would suggest first experimenting with existing data structure, such as VideoStats and see if you change the data on the VOXL side, make sure it shows up correctly in voxl-portal. After that, you could change the VideoStats structure add a message to it and also print it in the browser.

After understanding how the message passing works, you could add your own message definition on both sides and display the contents.

I hope this helps.

Alex
