How do i get the SealevelPressure Calculation working ?

Hello i´m very new to Programming and tried to build one of my first Project´s.
I used following link as basis: weather-station/arduino at master · flazer/weather-station · GitHub

Now i wanted to add the Calculation of the Pressure at my Sea Level.
I´m using a Wemos D1 mini with a BME260
and a Battery Shield

I get the error:

Arduino\libraries\BME280\src/EnvironmentCalculations.h:70:9: note: declared here

float EquivalentSeaLevelPressure(

^

exit status 1
too many arguments to function 'float EnvironmentCalculations::EquivalentSeaLevelPressure(float, float, float)

The Code is:

#include <BME280I2C.h>
#include <EnvironmentCalculations.h>
#include <Wire.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266HTTPClient.h>
#include <PubSubClient.h>

#include "settings.h"

ESP8266WiFiMulti WiFiMulti;
WiFiClient wifiClient;
PubSubClient client(wifiClient);

#define SERIAL_BAUD 115200
#define FORCE_DEEPSLEEP

float barometerAltitude = 361; 


BME280I2C bme;


/**
 * Le Setup
 */
void setup() {
  Serial.begin(SERIAL_BAUD);
  //while(!Serial) {} // Wait
  Wire.begin();

  splashScreen();
  delay(1000); //reprogramming

  Serial.println("---");
  Serial.println("Searching for sensor:");
  Serial.print("Result: ");
  while(!bme.begin())
  {
    Serial.println("Could not find BME280 sensor!");
    delay(1000);
  }

  switch(bme.chipModel()) {
     case BME280::ChipModel_BME280:
       Serial.println("Found BME280 sensor! Success.");
       break;
     case BME280::ChipModel_BMP280:
       Serial.println("Found BMP280 sensor! No Humidity available.");
       break;
     default:
       Serial.println("Found UNKNOWN sensor! Error!");
  }

  startWIFI();
   battery ();
}


/**
 * Looping Louie
 */
void loop() {
  runMQTT();
  sendSensorData();

  delay(500); //wait
  goToBed(minutes2sleep); //sending into deep sleep
}


/**
 * Building http-POST-request and send all necessary data              
 */
void sendSensorData () {


  
  float temp(NAN), hum(NAN), pres(NAN);

  String v=String(volt);// change float into string

  BME280::TempUnit tempUnit(BME280::TempUnit_Celsius);
  BME280::PresUnit presUnit(BME280::PresUnit_bar);
  bme.read(pres, temp, hum, tempUnit, presUnit);
  pres = pres * 1000; // convert to millibar
  
  EnvironmentCalculations::AltitudeUnit envAltUnit  =  EnvironmentCalculations::AltitudeUnit_Meters;
  EnvironmentCalculations::TempUnit     envTempUnit =  EnvironmentCalculations::TempUnit_Celsius;
  
  float seaLevel = EnvironmentCalculations::EquivalentSeaLevelPressure(barometerAltitude, temp, pres, envAltUnit, envTempUnit);

  client.publish(topic_temperature, String(temp).c_str(), true);
  client.publish(topic_humidity, String(hum).c_str(), true);
  client.publish(topic_pressure, String(pres).c_str(), true);
  client.publish(topic_battery, String(v).c_str(), true);
}


/**
 * Establish WiFi-Connection
 * 
 * If connection times out (threshold 50 sec) 
 * device will sleep for 5 minutes and will restart afterwards.
 */
void startWIFI() {
  Serial.println("---");
  WiFi.mode(WIFI_STA);
  Serial.println("(Re)Connecting to Wifi-Network with following credentials:");
  Serial.print("SSID: ");
  Serial.println(ssid);
  Serial.print("Key: ");
  Serial.println(password);
  Serial.print("Device-Name: ");
  Serial.println(espName);
  
  WiFi.hostname(espName);
  WiFiMulti.addAP(ssid, password);

  int tryCnt = 0;
  
  while (WiFiMulti.run() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
    tryCnt++;

    if (tryCnt > 100) {
      Serial.println("");
      Serial.println("Could not connect to WiFi. Sending device to bed.");
      goToBed(5);
    }
  }

  Serial.println("");
  Serial.println("WiFi connected");  
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());
  delay(300);
}


/**
 * Establish MQTT-Connection
 * 
 * If connection fails, device will sleep for 5 minutes and will restart afterwards.
 */
void runMQTT() {
  Serial.println("---");
  Serial.println("Starting MQTT-Client with following credentials:");
  Serial.print("Host: ");
  Serial.println(mqtt_server);
  Serial.print("User: ");
  Serial.println(mqtt_user);
  Serial.print("Password: ");
  Serial.println(mqtt_password);
  Serial.print("ClientId: ");
  Serial.println(mqtt_clientId);

  client.setServer(mqtt_server, 1883);
  
  while (!client.connected()) {
    Serial.print("Attempting connection... ");
    // Attempt to connect
    if (client.connect(mqtt_clientId, mqtt_user, mqtt_password)) {
      Serial.println("Success.");
      client.loop();
    } else {
      Serial.println("Failed.");
      Serial.println("Could not connect to MQTT-Server. Sending device to bed.");
      goToBed(5);
    }
  }
}


/**
 * Sending device into deep sleep
 */
void goToBed (int minutes) {
  #ifdef FORCE_DEEPSLEEP
    Serial.print("Uaaah. I'm tired. Going back to bed for ");
    Serial.print(minutes);
    Serial.println(" minutes. Good night!");
    Serial.println("---");
    ESP.deepSleep(minutes * 60 * 1000000);
    delay(100);
  #endif
}


/**
 * Dump some information on startup.
 */
void splashScreen() {
  for (int i=0; i<=5; i++) Serial.println();
  Serial.println("#######################################");
  Serial.print("# ");
  Serial.print(userAgent);
  Serial.print(" - v. ");
  Serial.println(clientVer);
  Serial.println("# -----------");
  Serial.println("# Chris Figge (flazer)");
  Serial.println("# Mail: info@flazer.net");
  Serial.println("# -----------");
  Serial.print("# DeviceName: ");
  Serial.println(espName);
  Serial.print("# Configured Endpoint: ");
  Serial.println(mqtt_server);
  Serial.println("#######################################");
  for (int i=0; i<2; i++) Serial.println();
}


void battery () {
  Serial.print ("Ahh Measuring");
  pinMode(A0, INPUT);
  raw = analogRead(A0);
  volt=raw/1023.0;
  volt=volt*4.5;
  Serial.println ("Nice! Volt:");
  Serial.print (volt);
}

I hope you can tell me what i´m missing. I tried to look at the Examples of the Library but this doesn´t helped me.

Sorry for my bad English im from Germany

Post a link to where you got the library EnvironmentCalculations from. Please use the chain links icon on the toolbar to make it clickable. Or if you installed it using Library Manger (Sketch > Include Library > Manage Libraries) then say so and state the full name of the library.

Thank you for your answer.
I used the Library from GitHub - finitespace/BME280: Provides an Arduino library for reading and interpreting Bosch BME280 data over I2C, SPI or Sw SPI.

The Library EnvironmentCalculation is also in this Library included.

The error message is saying that you are passing more than three arguments to a function that takes three arguments in this line:

  float seaLevel = EnvironmentCalculations::EquivalentSeaLevelPressure(barometerAltitude, temp, pres, envAltUnit, envTempUnit);

I count five arguments. Check the examples or documentation that came with the library to see what three values it needs.

Snackez:
I used the Library from GitHub - finitespace/BME280: Provides an Arduino library for reading and interpreting Bosch BME280 data over I2C, SPI or Sw SPI.

The Library EnvironmentCalculation is also in this Library included.

Oops, that should have been obvious to me.

It looks like you're using the 2.3.0 release version of the library. That version's source code for EquivalentSeaLevelPressure only takes 3 parameters but the Environment_Calculations example passes 5 arguments to it. In the most current non-release version of the library it does take 5 parameters. So, although generally I would recommend using release versions of libraries unless you're doing beta testing, in this case it would make sense to update to the latest version of the library:

Thank you very very much. You helped me out a lot.
I have one last off-Topic Question.
You say the Release Branch is comparable with Beta testing, is this right ? And the Master Branch is the Stable one ?

No, that's not right. The releases are stable versions of the library. You can download the release versions here:

There is no branch named "Release". The master branch is used for beta testing. So you got it both wrong and backwards.

Generally what happens is development work is pushed to the master branch, then once significant changes have been made and thoroughly tested a release is created. That release is a snapshot of the library at that specific time in history. So if you download the version of the library at the tip of the master branch you will get the latest development work but maybe not so thoroughly tested as would be expected from a release.

Sometimes other branches will be created for a variety of reasons. GitHub does make it very easy to compare between branches. I find that repository owners are very sloppy in their maintenance and branches are just outdated leftovers of development work that have no purpose. Even when branches do serve a purpose, this purpose is rarely documented. This can cause a lot of wasted time and confusion for the people trying to use or contribute to the project. The finitespace/BME280 repository does have some other branches. The only one that appears to be significantly advanced beyond the master branch is softwarewire. The name indicates this contains a software implementation of the I2C protocol. I wouldn't bother using that branch unless you specifically need that feature.